About EasyMorph Tutorials & Examples Web-help

"Iterate table" action with column names sent as parameters

Hello,

I’m using the “iterate table” action to do multiple comparisons of columns at once. I want to do the same comparison over multiple pairs of columns (in total, 93 pairs), so I thought about using the “iterate table” action to pass the original table with the data + iterate a table that has a list of the 93 different pairs of column names to be compared. These column names are to be included as parameters in the expressions found in the iterating module.

Here is the table with the different pairs of column names I’m iterating, sending each value as a parameter:

And here are the expressions in the iterating module, where I want the parameter to act as a column name of the table I’m passing:

However, the expressions in the module are not recognizing the parameter as a column in the table, but as text. In the first iteration for example, for parameter {CAMPO PRODUCTO A} it is interpreting literally “[PLANT - A]”, and for parameter {CAMPO PRODUCTO B} it is interpreting literally “[PLANT - B]”, so its comparing these two texts, instead of going to search for the value of the column [PLANT - A] and [PLANT B], which actually exist in the table I am passing.

Is there a way for the expression to recognize that the parameter as an actual column, and not as text?

Thanks very much,

Roberto

It looks like you need to use the eval() function here. For instance, if parameter {CAMPO PRODUCTO A} has value "[PLANT - B]" then expression

eval({CAMPO PRODUCTO A})

evaluates to

eval("[PLANT - B]")

which in turn evaluates to the actual value in column [PLANT - B] instead of text string "[PLANT - B]".

1 Like
To learn more about EasyMorph visit easymorph.com.