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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
TextSource text for processing.Robin.String
Yes
Spaces as emptiness
Robin.BooleantrueNo
Results
ResultBoolean variable to which the test result will be writtenRobin.Booleantrue

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

  1. Create a boolean variable to which the result of the "Check for null and void" action will be written. 


  2. Move the "Check for null and void" action to the workspace and set its parameters. 


  3. Move the "If" action to the workspace and set its parameter. 


  4. Add a "Show message" action to the "Truth" branch and set its parameter. 


  5. In the "False" branch, add a "Show message" action and set its parameter. 


  6. 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 

  • Нет меток