cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seth350
Frequent Visitor

Flow: Loop through Form Responses and Check For Specific Answer

Hello,

 

I am to setup many Forms with many questions, all with only three available answers to each question. Is there a method to loop through the form responses one by one?

 

For example,

If I have a Form with 30 questions, each question can only be answered with "Yes, No, & Maybe". I would like to conditionally send an email to a person if there are one or more answers as "No", to notify them that something is wrong.

Is it possible to loop through the collection of form responses and compare the answers to see if any one of them equals "No"? 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Flow: Loop through Form Responses and Check For Specific Answer

Hi @seth350,

 

Unfortunately, there is no way to loop through the collection of form responses of Form directly.

As a workaround, you may need to construct a lengthy and repetitive Flow to put these responses into an array, like as below:

Initialize an array variable, and then append these Responses of questions, because you have 30 questions, so you may need to create 30 Append to array variable actions.

Annotation 2019-11-13 141033.png

After the repetitive and simple operation, you can use the Apply to each action to loop through these responses by using expression item()?['Response']. And then you can compare the answers to see if anyone of them equals "No" by using Condition action.

Annotation 2019-11-13 141102.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Re: Flow: Loop through Form Responses and Check For Specific Answer

Hi @seth350,

 

Unfortunately, there is no way to loop through the collection of form responses of Form directly.

As a workaround, you may need to construct a lengthy and repetitive Flow to put these responses into an array, like as below:

Initialize an array variable, and then append these Responses of questions, because you have 30 questions, so you may need to create 30 Append to array variable actions.

Annotation 2019-11-13 141033.png

After the repetitive and simple operation, you can use the Apply to each action to loop through these responses by using expression item()?['Response']. And then you can compare the answers to see if anyone of them equals "No" by using Condition action.

Annotation 2019-11-13 141102.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

seth350
Frequent Visitor

Re: Flow: Loop through Form Responses and Check For Specific Answer

Thank you very much for the solution.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (6,985)