Extract by position Version 5 (Java)

Action group: Text


Description

The action extracts the specified number of characters from the specified position.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Source textText to make action onRobin.String
Yes
PositionThe zero-based starting character position of a substring. If the specified value is greater than the possible value, an error will be thrown.Robin.Numeric
Yes
LengthThe number of characters to extract. By default, it is fetched to the end of the line. If the specified value is greater than the possible value, an error will be raised.Robin.Numeric
No
Results
ResultA string variable to which the extracted text will be written.Robin.String

Special conditions of use

None.

Example of use

Task

There is a variable "Source text" with value "HouseBuild". Extract value "House" and display it in a dialogue box.

Solution

Use the "Extract by position", "Show message" actions.

Implementation

  1. Create a Text variable where the "Extract by position" action result will be written into.

  2. Move the "Extract by position" action to the workspace and set its parameters.

  3. Move the "Show message" action to the workspace and set its parameters.

  4. Click "Start" in the top panel to start the robot.

Result 

The text is extracted from position, the desired value is displayed in the dialogue window.

  • Нет меток