Hi,
I've created a MS Form with 5 subforms branching within it. The output from this is successfully loaded into a line item in a SharePoint list (with 5 views created for each of the 5 subform types)
Upon GetItem in Power Automate the body of the item contains the following questions (shortened from the real case):-
{
"Health_x0020__x0026__x0020_Safet": "No problems observed",
"Safe_x0020_Access_x0020_and_x002": "Opp. for improv.",
"Site_x0020_Clean_x0020__x0026__x": "No problems observed",
"Ask_x0020_to_x0020_View_x0020_th": "Opp. for improv.",
"Ask_x0020_the_x0020_Operative_x0": "Non-conform. issued",
"Ask_x0020_the_x0020_Operative_x00": "Job stopped",
"Ask_x0020_to_x0020_View_x0020_Pe": "Non-conform. issued",
"Check_x0020_a_x0020_Sample_x0020": "Opp. for improv.",
"First_x0020_Aid_x0020_Kit_x0020_": "No problems observed",
"Fire_x0020_Extinguisher_x0020_Av": "Opp. for improv.",
SNIP
}
Each of the questions can be answered with 6 possible answers
"No problems observed"
"Opp. for improv."
"Non-conform. issued"
"Job stopped"
"N/A"
"Not Checked"
What I'd like to do is run through all the question answers and increment a variable for each of the different answer types each time it is encountered in the body
So e.g.
{
"Health_x0020__x0026__x0020_Safet": "No problems observed",
"Safe_x0020_Access_x0020_and_x002": "Opp. for improv.",
"Ask_x0020_the_x0020_Operative_x00": "Job stopped",
"Ask_x0020_to_x0020_View_x0020_Pe": "Non-conform. issued",
}
would result in
No problems observed = 1
Opp. for improv. = 1
Non-conform. issued = 1
Job stopped = 1
N/A = 0
Not Checked = 0
Would score 311
Where =
No problems observed = 1
Opp. for improv. = 10
Non-conform. issued = 100
Job stopped = 200
I've tried so many different ways of doing this I'm tearing my hair out (and I haven't got that much to spare).
What is the best (and 'how') to do this?
Thanks in advance