05-29-2018 01:04 PM
Hello all,
I have some fairly complex logic with ternary operators and I have ran into a snag. I am using Step.TS.SData.ViCall.Parms.ArgVal to return the input values for my VIs. However, when I use a variable as an input for my VI, Step.TS.SData.ViCall.Parms.ArgVal will return the variable's name.
An example would be:
Step.TS.SData.ViCall.Parms["RemoteIP"].ArgVal returns Locals.IP
Rather than
Step.TS.SData.ViCall.Parms["RemoteIP"].ArgVal Returns 192.168.0.1
Is there a way to return the value of a variable rather than its name, or evaluate its value given the name?
Thanks,
Brady James
Solved! Go to Solution.
05-29-2018 03:04 PM
Hi James,
You should take a llok to the TS function 'Evaluate'.
You can easily use it within an expression to get the value contained in a variable only know by its name (as a string).
To find it, click on f(x) within an expression edit box and take a look to the 'Operatros/Functions' tab, section 'Functions', line Other.
05-30-2018 06:57 AM
Thank you very much! This worked great!