cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seth350
Level: Powered On

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 Team
Community Support Team

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 Team
Community Support Team

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
Level: Powered On

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

Thank you very much for the solution.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,456)