I want to do some regex on a child element's name, for this example let's say there's a view which is called 'RF cams', and it has child elements which are always called "RF Cam 1", RF Cam 2", etc. There are quite a few and I want the number to be quite large, so I want to cut the 'RF Cam ' part from the displayed name.
If i could use the asterisk in the text box I could work with that, but as I can't (partly because you can't use that with regex as I understand it, and because the asterisk returns blank on this child shape for some reason).
So how can I do this? Currently I'm using "Info" - "Name" and an asterisk to display the name.
Thanks peeps!
You can use regexreplace to make modifications on the displayed name.
Rather than using the Info shape data, we recommend nowadays to use the placeholder in your shape text. That means
- Remove the Info shape data
- Replacing the asterisk '*' in your text with "[Name]" will give you the same result
- You can now wrap the "[Name]" in a regexreplace directly in your shape text. e.g. [regexreplace:RF Cam ,[Name],]
Indeed, it opens up a world of possibilities as you can also use multiple info tags in one shape, where previously you were limited to one.
I have been using [this element] placeholder in most places, the [name] placeholder passed me by as it’s not directly listed in the placeholders documentation, but now I’ve seen the link to the ‘info’ part at the top, that’s going to be very useful, thanks!