Hopefully someone can help me identify why this is not working as expected.
I have reduced the macro down to the basics.
I have a JSON file and I want to retrieve the members listed in the Team[] key array.
Everything works except the Local__team variable is blank.
I have also tried with same result.
%JSONValue%JSONV.value.fields.Team[{%Variable%Local__count%}]%
If I use the following, I do get the last value in the array, but I want to to get all values.
I need to get them individually for the next phase.
%JSONValue%JSONV.value.fields.Team[COUNT()]%
I found a workaround using
%JSONValue%JSONV.value.fields.Team[COUNT() - Local__count]%
and modifying the Local__count start and test conditions.
Would prefer to get it working without using COUNT() for use in other cases
unrelated to this test.
Continuing forward using this information I am stuck at the next step.
I am trying to avoid using a bunch of if tests which is my back up plan.
I now have a list of variables Local_Team A, etc which will be 0 or 1
depending if they are in the array.
So far so good.
Using the above variables, I launch a checklist prompt with the already included
Teams checked allowing to change check/uncheck each team in the list.
This will set the variables to the new 0/1 setting.
Using a For action, I am trying to loop over the variables and capture the ones that are set to 1.
Here is what I have.
The trouble is in setting the Local_team variable.
Not sure if I can do it this way using this to access the values in each Local__Team x variable.
%Variable%Local__{%Variable%Local__teamResults%}%
I can use a variable to create part of the name of a new (or existing) variable,
but I can't figure out how use the same concept to retrieve the value of the variable.
I may just have to resort to many if statements, but thought I would check here first.