I’m trying to use si(mindex) in a Global (for use with a weather resource). I’ve just noticed that if I assign this global to a resource it doesn’t work (returns 0 always) BUT if I use that same Global inside a formula, it works as expected.
Steps to reproduce:
Create a Global with si(mindex)
Create an Stack Group (easier to test with)
In the Stack Group, create a Text item and set the Text to the Global you created in #1
Copy that Text item a few times
To verify the global works as expected, instead of setting the Text item to a Global in Step 3, add the Global variable in the Formula of the Text item and copy it a few times.
@frank I’ve not seen any bug reports about this but I presume this is not intended? Not sure why you’d have to use a formula rather than just being able to assign the Global directly?
Oh, something to note that I’ve just spotted - when I go to apply the Global to the Text item, it’s not showing the full path to the Global. which is likely the reason…
I have the global inside 2 folders (weather/forecase/temp) - when I go to assign it it only shows as weather/temp but when I assign it inside the Formula, it sets it with the full path.
I just tested, and I didn’t see any issue. I’m sorry if I misunderstood here.
As far as I understand, $si(mindex)$ works relatively, based on the layer it is called from. So, from my test, if it is defined in a global variable then it will give different index when it’s called from different layers.
Another consideration is using a 2nd parameter in si(mindex) as a pointer to the layer level.