Use INT tag for variable [resultColumn] in lookup expression

Is there a way to use an integer tag in [resultColumn] parameter of lookup expression so i can have a single lookup tag instead of having to create 45 different looup tags? I tried just putting the tag name in and get ‘Error_TypeConversion’ when plc sets the lookup tags.

Are you sure the tag is coming in as an integer? You should just be able to do
lookup({dataset}, {value}, defaultValue, lookupColumn, {path/to/driving/tag}). Where is the expression located? Perhaps the value type coming out of the lookup expression doesn't match the expected type.

Show your expression, and where it is located/bound.

Edit: I tested the above with using both a tag and a custom property to drive the resultColumn value, and was not able to get it to give me a conversion error. Even passing in a null value to the resultColumn value resulted it in returning a value.

1 Like

Thank you for the reply. I checked back on the data types, and found that i had forgotten to set the expression tag to string. Fixed that and working perfectly.