Command Reference

Right String

Creates a new string from the right-most x characters of an existing string.

Action ID: 33
Action Category: Strings

Settings

Store result in variable

The variable that the result will be stored in. The result will be a new string made up of characters copied from the source string.

Source string

The string to copy the characters from.

Number of characters

The number of characters to copy.

Return Values

None

Example

In this example, we will strip the file extension from a file and store it in a custom variable named %Extension%. We can assume that the extension is 3 characters long in this case because the filename was returned by one of our PHP pages after a Submit to Web action, and our PHP script ensures that the return value follows the DOS 8.3 naming format.

Note: In this example we use a custom variable named %URLFile% to represent a filename returned by one of our PHP pages. This is not a built-in variable and would need to have been assigned a value earlier in the setup.

Store result in variable: %Extension%
Source string: %URLFile%
Number of characters: 3

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab