Trim spaces form text within a variable

I wish to trim spaces from the text stored in a variable.

I am using an expression to do this and storing the result in another variable

my expression is:

trim(@Variable.AM_Data_Machine , ' ') + trim(@Variable.AM_Data_Equipment , ' ') + '-' + trim(@Variable.AM_Data Location , ' ') + trim(@Variable.AM_Data What_to_Check , ' ')

although the spaces are not removed.

is there any way of removing the spaces within the text stored in a variable.

Many thanks for looking

Trim will remove spaces from the ends. Technical Details of the Expression Editor | Tulip Knowledge Base - Support for Building Operations Apps
You can probably use a substitute to accomplish this.

@Spikenaylor,

@mellerbeck hit the nail on the head here, substitute is absolutely the right approach, This is how I would do it.

Pete

2 Likes

Many thanks
Worked great

Regards