Check text for null and void Version 6 (Java)
Action group: Text
Description
Checks if the text is empty or equal to "null"
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Text | Source text for processing. | Robin.String | Yes | |
Spaces as emptiness | Robin.Boolean | true | No | |
Results | ||||
Result | Boolean variable to which the test result will be written | Robin.Boolean | true |
Special conditions of use
None.
Example of use
Task
There is a variable "Input text" with the text "Hallo!". It is required to check the text in the variable for null and empty, write the result to a boolean variable and print a message: text is empty or text is present.
Solution
Use the actions "Check for null and void", "If", "Show message".
Implementation
- Create a boolean variable to which the result of the "Check for null and void" action will be written.
- Move the "Check for null and void" action to the workspace and set its parameters.
- Move the "If" action to the workspace and set its parameter.
- Add a "Show message" action to the "Truth" branch and set its parameter.
- In the "False" branch, add a "Show message" action and set its parameter.
- Launch the robot using the "Start" button in the top panel.
Result
The text is found and the result is displayed in the dialog box
Обзор
Инструменты контента