Count Lines Action

image\Action_Count_Lines.jpg

The Count Lines action is used to count the number of Lines in a Text object or a variable and save the number to a specified variable.

Note:
This action will count the number of lines on which text appears within the text box and NOT the number of carriage returns. In other words, if you type into a text object and the text automatically wraps around to a new line then the new line will be counted.

Setting up the Count Lines action:

1. Add the Count Lines action to your trigger, as described in adding actions. The Count Lines tab will automatically appear when you add the action.

2. If you want to count the lines in a Text object, use the Object option in the Count Lines In… panel to select the Text object. Click on the down arrow to the right of the Object option to select the name of the Text object. By default this option is selected.

Note:
Only the names of Text objects on the current page will be listed in the drop down box.

3. If you want to count the lines in a variable, use the Variable option in the Count Words In… panel to select the variable. Click on the down arrow to the right of the Variable option to select the name of the variable from the list. Alternatively, click on the New Variable… button to create a new variable – this will open the New Variable dialog box.

Note:
This option is useful if you want to count the number of lines entered by a user in an Input Text object because input is normally saved into a variable.

4. Use the Store Result In… panel to select or create the variable in which the line count should be stored. Click on the down arrow to the right of the Variable option to select the name of a variable from the list. Alternatively, click on the New Variable… button to create a new variable – this will open the New Variable dialog box

Note:
The result of this action will always be a number – if there are no lines than the result will be 0 (zero).

5. Click on the Apply button to save your changes.

Related Topics:

The Count Words Action

Choosing an Action