Hi,
We have several parameters displayed on a service visual overview, so we don't need lots of custom properties against the service we've consolidated a lot of the value into lists, that we use regex replace to return just the N'th position in the list which work fine on the 'Parameter' shape data, but doesn't on the 'Element' shape data, which I'm guessing is down to us using pipe in the regex replace, which is used to define the Visio page against 'Element', and reading the help page it doesn't look like is implemented against the 'Element' shape data.
Example of what doesn't work in Element
Alternate example of what does work in element, but isn't as clean for getting the second position for example
Another option that does work, but is very messy on the Visio is to use the placeholder, giving us
Example Visio
Example Cube
Hi Toon,
All the values for the regexreplace return correctly when putting them directly in a text shape.
primary element is a semicolon list of element names.
I’m mainly interested in seeing the actual results of both to see where special characters might be messing up something.
Primary Element contains ‘DCXATVX20;DCXATVX20;’
Primary Output contains ‘Slot 1 DCX_ATVX20_TEST_OP_02;Slot 1 DM_TEST_01_DVB;’
Hi Philip, what about the result of the full regexreplace? As I assume that’s intended to print out the first element in the list?
There is a bug in a core part of the code apparently that causes this issue. Fixing it involves a bit of risk since every shape runs through this piece of parsing.
Luckily, we could immediately try out a workaround that should fix it. You can put the entire regexreplace on page level in the execute page data and use it to do a setvar. The execute data will look like this: "Set|Variable|primaryElement|<your regexreplace here>|ValueChanged". You could also include the ExecuteSetsOnInit option to make sure the variable is also set upon init if the property is already fetched at that point.
You can then use the variable in your shape instead.
What is the exact result of your full regexreplace? You can check by putting it into shape text. Furthermore, what is the value of your “primary element” property?