This function cuts a number of b characters from the right side of text a. The optional parameter c controls the behavior of the function if no text is left after the operation.
Parameters
Parameter | Description |
|---|---|
a | Text. |
b | Number of chars to cut off. |
c | (optional) Behavior for empty result text. Allowed values: string, empty, preserve. Default: string. See the following table for details. NOTE: Choose parameter type "Value" and then use the three dots to select a value. |
Parameter c can have the following values with the following function results/actions.
Temporary result (below) / Parameter value (right) | string | empty | preserve |
Parameter a was a field with set empty flag | Empty text is returned. | Empty text (string of length 0) and empty flag are set in the field that uses the function. | Empty text (string of length 0) and empty flag are set in the field that uses the function. |
No characters left | Empty text is returned. | Empty text (string of length 0) and empty flag are set in the field that uses the function. | Empty text is returned. |
A non-empty text remains | Result text is returned. | Result text is returned. | Result text is returned. |
Examples
Parameter a | Parameter b | Parameter c | Result | Empty flag set |
|---|---|---|---|---|
abc | 1 | ab | No | |
abc | 2 | a | No | |
abc | 3 | No | ||
abc | 3 | string | No | |
abc | 3 | empty | Yes | |
abc | 3 | preserve | No |