Global List

Is there a way to use the list global like an array? I would like to keep key words in a list, then use those key words in an “if” formula. I’m trying to show a Bluetooth battery icon, but only for certain connected audio devices.

So something like $if(nc(aname,0) in gv(list), 1,0)$. Is that possible? It would be much cleaner to have a global list and update that, then to update a bunch of hard coded references.

Hi there,

Try this solution, it might be suitable to your need.

  1. Create a global variable (type: Text) to store a JSON data ➞ i.e. JSONdata
  2. Enter the data into the JSONdata variable ➞ i.e. {"a":1, "b":2, "c":3}
  3. Retrieve the JSON data using tc(json, …) function ➞ i.e. $tc(json, gv(jsondata), ".a")$

I hope this would help.
:smiling_face::+1:

1 Like