G Web Development Software

Showing results for 
Search instead for 
Did you mean: 

How to update multiple numeric/string indicator values using control reference

Go to solution

New to G web development - I was wondering how to update multiple indicator values using control reference. 

I don't want to create individual control reference for each one of the indicators present on the Panel. 

0 Kudos
Message 1 of 9

If they're separate indicators then you need each reference. The other option is to collect them into a cluster and then you can have a reference for the cluster and update all of them at once but lose the ability to work with them individually as easily.


You can collect the references into an array to make it more streamlined to just iterate over them and set values.

Message 2 of 9

I thought about it and ended up thinking - How are the clusters handled as part of the tags ? 

0 Kudos
Message 3 of 9

SystemLink tags?

0 Kudos
Message 4 of 9

Yes system link tags

0 Kudos
Message 5 of 9

If you're getting an array of values from tags and have a corresponding array of references you can iterate over both and use a value property node to update the indicators. Just need to make sure the reference array and values line up.



Message 6 of 9
Accepted by topic author LanzaTech

That's a good solution than what i have found so far. But i think it would be really difficult to control reference array and value line up where there are many tags. I should probably explore the tag properties to see if we can set some order in there. 

I am attaching a screenshot of how i did it in the mean time. My tag list is quite long. 






Message 7 of 9
Accepted by topic author LanzaTech

Yes something like that would be a better route; anytime the terminal can be used directly (opposed to using a reference) then that will generally be the preferable route.


You could use the array of references and property nodes to pull the label text out into an array that could be used to lookup which control index the value should be written to. This would allow just tacking tag names in arbitrarily (and not having issues if the tag API changes their sorting) and adding control references anywhere in the array but of course it would perform a little worse than the case structure selection.

Message 8 of 9

I was kind of aiming to achieve that and was not very definitive before you mentioned the programming route as below. I know now and the performance difference between both. 


Thanks for all your support.   

0 Kudos
Message 9 of 9