I want to do some formatting of a text string in a expression.
The string is my current “Window Path”. It is stored in a client tag.
The data stored in the tag would typically be something like:
Based on a user selection (integer) in a IO-field i want to break up this string.
If the user selects “1” then the expression should return: “Plant/”
If the user selects “2” then the expression should return: “Plant/Production/”
If the user selects “3” then the expression should return: “Plant/Production/BioTech/”
… and so on.
I’m struggling to do this in a expression as it seems i can not use a FOR-loop. Do i need to do this operation in a Jython-script?