Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.
Already have an account? Login
You can subscribe to this forum after you log in or create your free account..
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.
Already have an account? Login
Posted: 2020-10-07 12:10 PM
Trying to create a text animation expression that will give me all the characters after the last occurrence of a Space or particular character.
I've seen examples online that use in string reverse, Find, Trim and other commands that don't seem to be available. I think I've only got InString, Left, Mid, Right, Len etc.
I've tried nesting some Mid commands and it works but it's getting ugly fast.
MID( MID( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), INSTRING( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), ' ' ),-1 ), INSTRING( MID( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), INSTRING( MID( ".Name", INSTRING( ".Name", ' ' ),-1 ), ' ' ),-1 ), ' ' ),-1 )
Using the Right command also works but seems a little fragile. If there was an extra space in the last seven characters and or the end of the string that I want at some point is greater than seven characters it'll stop working.
MID( RIGHT( ".Name",7), INSTRING(RIGHT( ".Name",7), ' '), -1 )
Posted: 2020-10-07 02:40 PM
Check out ELEMENT(), specify a space as the splitter, index of 0 (or 1, can't remember which is the first index) and specify in reverse (i.e. last param is 1).
See the help for all the options on ELEMENT()
Posted: 2020-10-07 02:40 PM
Check out ELEMENT(), specify a space as the splitter, index of 0 (or 1, can't remember which is the first index) and specify in reverse (i.e. last param is 1).
See the help for all the options on ELEMENT()
Posted: 2020-10-07 03:08 PM
Thanks!
That is much better. Too bad it's not on the same page in the manual as the String Functions.
This works:
ELEMENT(1, ' ', ".Name", 1)
I had to search for "Element (" with quotes to find it.
Posted: 2020-10-22 09:22 AM . Last Modified: 2020-10-30 11:00 AM
Sort of on the same topic, is there a command that's the opposite of STR? I'm having some issues with parameter values not being processed by the expression in a way I'd expect. I have an object in the template that's looking at a parameter for its visibility and that works but if I take the same parameter and the visibility is a expression flowchart it no longer works unless I say parameter: tag1 =’1’. I can also get around it by saying “parameter: tag1 OR parameter: tag2”. But I can't use a flow chart expression to check if tag one is true and then if tag two is true and so on. I'm thinking it's because when I use the flowchart expression it's seeing the "parameter: tag1" as a string and not a value.
*****************
Looks like INT works.
INT(INTEGER or REAL)
User | Count |
---|---|
193 | |
78 | |
32 | |
23 | |
18 | |
11 |
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.