Empty or Null Text Variable
Verb: textNullOrEmpty
Checks whether the content of a text variable is empty or null.
Syntax
textNullOrEmpty --text(String) (Boolean)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--text | Text | Required | Text | Text variable to check whether the content is empty or null. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Result | Boolean | Boolean that returns "true" if the Text parameter is null or empty, or "false" if otherwise. |
Example
Example 1: Checks whether the content of the text variable "checkText" is null or empty, in this case returning True.
defVar --name checkText --type String
defVar --name nullOrEmpty --type Boolean
// Checks whether the content of the text variable (checkText) is null or empty.
textNullOrEmpty --text "${checkText}" nullOrEmpty=value
logMessage --message "${nullOrEmpty}" --type "Info"
// This example produces the following result: true.
Example 2: Checks whether the content of the text variable "checkText" is null or empty, in this case returning False.
defVar --name checkText --type String --value "IBM"
defVar --name nullOrEmpty --type Boolean
// Checks whether the content of the text variable (verifiedText) is null or empty.
textNullOrEmpty --text "${checkText}" nullOrEmpty=value
logMessage --message "${nullOrEmpty}" --type "Info"
// This example produces the following result: false.
Remarks
In the Text parameter: