Hi
I’m new to Ignition so this is probably a very basic problem. Ignition v7.9.
I have put together a simple template called ‘Analogue_Input_UDT’. The intended function is to display the analogue input in a numeric label and to display the tag name in a label above. The numeric indicator works perfectly. However, I’m struggling to extract the tag name from an address that is pushed to my template.
For example, “PASTE/Analogue Input/A16LT001” is my input path (TagPath) and I wish to extract the “A16LT001” string.
The following expression returns the string “PASTE” as expected.
split({Analogue_Input_UDT.TagPath},"/")[0]
If I change this to any of the following, an array out of bounds error is generated.
split({Analogue_Input_UDT.TagPath},"/")[1]
split({Analogue_Input_UDT.TagPath},"/")[1,0]
split({Analogue_Input_UDT.TagPath},"/")[1,1]
I know the result is a dataset because I have bound the split path to the data input for a table and it shows 1 column with three rows. e.g. PASTE, Analogue Input, A16LT001.
Can someone help me to return the 3rd row of the first column please? I’m sure my syntax is incorrect but I can’t work out how to fix it.
Thanks!