ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
08-28-2012 10:16 AM
Hi
I am adding some features to a custom step type. One of the features is showing some step's data in the description field.
But some data are in an array of dynamic size.
Is there a way to iterate through the arrays in the expression field ?
This question is not limited to Step Description Expression. You can use it in every Expression.
Regards
Juergen
Solved! Go to Solution.
08-28-2012 08:02 PM
Juergen -
The expression language does not have "for loop" iterator syntax, so the only option that you have is to process the step description string as in the post-step and store it in a step property during run-time. If you want to display the data in the array in a simple list, then you could use Str to format all the elements of the array, for example the folloiwng expression:
Str({1,2,3,4}, "%d", 1, False, " - ")
would output
1 - 2 - 3 - 4
08-31-2012 03:05 AM
Hi Scott,
Thanks for the anwser.
For the iteration, i have switched back to an old solution which used the Evaluate().
http://forums.ni.com/t5/NI-TestStand/Loop-in-a-Pre-Expression/m-p/838888
Regards
Juergen
08-31-2012 10:30 AM
That's pretty cool, I had not seen anyone suggest that before. Thanks.