Hello Everyone,
I have a google sheets that lists students and their classes (class A, Class B, and Class C). The goal is to create a document that fills in all of their info onto a template. I’ve figured out to do all of that but i need to include the number of students listed on each document which i could do if i could count the amount of arrays that go through. the answer to this question is the closest that i’ve been able to find to solve my problem but i can’t figure out how to connect it to the info that has been recieved from the google sheet to actually count the arrays.
Here are some photos that explain what i have right now
Overview:
If I understood your question you want to have a count of the number of students in each Class?
If this is the case, here are some options:
Use the map function to extract all the instances of Class = Class A. This would look like this: map(Array;key;Class;ClassA). The last step would be to apply the length() IML function around the above map function. Then you would need to do this for each Class you are interested in.
Note that you would need to dynamically map the array, and then statically map the remaining parts of the function (everything after the first semicolon). In these static mappings you need to use the ‘raw’ value from your array. You can find this by either downloading the output (top right) or hovering over the field you care about.
Thank you for your response @IOA_Harman . I’m just not sure where to start. Where would i be putting the map(Array;key;Class;ClassA). I’m also not sure how to get to the step where the json gives me the raw: itemcode options