If index of table contains pipe "|" character, when using [tableindex] placeholder in visio, visio consider pipe as part of code and won't add any character after the pipe to the index value. I have tested that using session variable and had to replace "|" with "/" in order to use [tableindex] placeholder
Hi Ladan
In most cases where your content has a character that is used as a separator in the same shape data, you can use the "[sep:<defaultSeparator><newSeparator>]" to work around this. In your case the defaultSeparator will be '|' and your newSeparator can be any character you're not using in your actual content (such as '~'). Then your "[sep:|~]" can be placed at the start of the part that gets split on this character and everything should work fine.
For instance, when you have a condition that is formed as follows:
<A>and<B>-A|Value|randomValue|=true-B|Value|[tableIndex]|=false
Your sep placeholder can be added where you define that condition as follows:
<A>and<B>-A|Value|randomValue|=true-[sep:|~]B~Value~[tableIndex]~=false
Now, let's say instead of a '|' your content contains a '-'. In that case you have to place the sep placeholder at the very start of your shape data since the '-' is the split character for the larger parts of your condition and not just the definition of one of them. In that case, you can do this:
[sep:-#]<A>and<B>#A|Value|valueWith-|=true#[sep:|~]B~Value~[tableIndex]~=false
I realize it's a bit abstract to explain in text, but try to split the parts up into their smaller and bigger components and it should be clear:
- [sep:-#]
- <A>and<B>
- A|Value|valueWith-|=true
- [sep:|~]
- B
- Value
- [tableIndex]
- =false
I took extended conditions as an example because they contain a lot of split characters but this should go for most if not all shape data where it can be necessary (it won't work for options that have predetermined values such as AllowInheritance=True/False, but it's not needed there anyway).
The extended conditions dataminer help page also has this info if you want to see it from a different writing standpoint.
Yes, you are completely correct with your last example! As I explained in my answer, the sep placeholder should always be placed at the start of the parts where the split happens. In this case the format is : where possibleValues is split with a ‘|’ by default. That means your sep placeholder should go in front of the possibleValues part if your value contains a ‘|’.
Hi Toon
I know about the separator but how do you use it in Setvar and Variable data. My visio is actually very simple. In SetVar I set “Test:[tableindex]” and in Variable shapedata I just put “Test”.
In this case if [tableindex] is “PICK|PIK|1832” then in variable shape it’ll only display “PICK”.
I didn’t try “Test:[Sep:|^][tableindex]”. so I’m not sure if that works or not