Syntax | isNull(variable) | Package | | Alias | | Pkg Usage | |
|
Description
Checks if the provided variable is null or has no value associated then returns "true", otherwise returns "false". |
Checks if the provided variable is null or has no value associated then returns "true", otherwise returns "false".
Parameters
Parameter name | Type | Required | Description |
---|
variable | Any | Yes | Value you want to test. Value argument can be a string or a variable of any type. |
|
Return Type
Boolean (true/false)
Examples
Example 1
Checks whether the assignee was selected for a ticket.
if(isNull(assignee)) {
assignee = reporter;
} |
Example 2
The following line checks whether the Time Spent field contains any work logged on the ticket.
if(isNull(assignee)) {
assignee = reporter;
} |
You can also use the hasInput routine to check whether certain fields were filled out during a workflow transition. And among those fields you can also check the work logged in particular.
If isNull returns "true" the variable has no value attached. isNull returns "false" for zero for numeric variables or blank for character/string. |
See also
defaultcom.atlassian.ecosystemfc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock14ea6e88-56fe-496c-ae0c-6021ff61d696ari:cloud:ecosystem::extension/fc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacockd7dcaa12-f66a-4dd7-afd6-2127c7657a30defaultcom.atlassian.ecosystemfc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock14ea6e88-56fe-496c-ae0c-6021ff61d696ari:cloud:ecosystem::extension/fc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacockd7dcaa12-f66a-4dd7-afd6-2127c7657a30