Shorten or truncate a field

You can use the USER_SYM_SUBROUTINE subroutine with the TRUNCATE argument in a complex User Symbolic to shorten the data displayed to a certain number of characters for a specified field.

Subroutine name

USER_SYM_SUBROUTINE

Subroutine argument

TRUNCATE

Field type

All fields

Example of use

You could restrict your Brief Description field in reports to 100 characters.

Argument syntax and parameters

The subroutine is a piece of code that uses ‘arguments’. An argument is a set of options that tells the subroutine what to do. The argument parameters are commonly separated by an exclamation mark.

The TRUNCATE subroutine argument structure is:

TRUNCATE!arg2!arg3

What the argument parameters mean

Argument parameter Required or optional? Explanation
arg2 Required Internal field name of field to be truncated.
arg3 Required Number of characters to truncate at.

Example of subroutine argument

This argument will truncate the Brief Description field in the Object file after 45 characters.

TRUNCATE!BRIEF_DESC!45