web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to get survey q...
Power Automate
Unanswered

Unable to get survey questions if survey has multiple sections

(0) ShareShare
ReportReport
Posted on by 6

Hello,

 

I have followed the solution posted by @edgonzales on this post, but ran into some issues with the flow.

 

This is the overview of the flow I am having trouble with:

 

completeFlow.JPG

 

I am trying to get the survey responses, extract the questions and answers, append each question and answer pair to an array, and store that into the database.

 

The List Records gets all of the respective answers for that particular response with the Form ID and response ID as the filters. Response Id is the output from ResDetails (second step in the previous screenshot):

 

listrecord (1).JPG

 

Then the apply each function loops through each answer, get's the question text using the question ID from the response, and appends the question text and response to the array variable varResponses.

 

Value is the output from List Records.

 

applytoeach (1).JPG

 

I was able to run this flow successfully until I added additional sections to the survey; I noticed that the Apply to each greyed out when the flow executed. I'm assuming this means that the List Record did not return anything for the Apply to each to execute?

 

applytoeach-grey.JPG

 

If this flow works for a survey with one section, I'm clueless as to why List Records is not returning anything for a survey with more than one section. Does having multiple sections affect the way responses and answers are stored? Or maybe it grayed out for other reasons?

 

edit:

It seems to be happening randomly. I set up a survey with only one section and three questions. I get the same exact problem as mentioned above randomly when I answer one or two out of the three questions in the survey. However, whenever the List Record returns a blank array (I actually emailed the output to myself and it was blank), I always get the correct results if I just simply select the resubmit button. Whereas, with surveys that have multiple sections, no matter how many times I hit the resubmit button the array always returns blank.

 

edit:

I just looked at the timestamps and it seems like the questions and answers are not writing into CDS fast enough...here are some data I collected:

Trial#1:

Flow ran at 8/27/2020 11:32:32 AM

List record returns an array successfully

List record returns with creation date 8/27/2020 11:32:33 AM

Trial#2:

Flow ran at 8/27/2020 11:23:08 AM

List record returns blank array

Flow ran at 8/27/2020 11:23:57 AM

List record returns blank array

Flow ran at 8/27/2020 11:24:28 AM

List record returns blank array

Flow ran at 8/27/2020 11:25:28 AM

List record returns blank array

Flow ran at 8/27/2020 11:31:24 AM

List record returns an array successfully

List record returns with creation date 8/27/2020 11:26:35 AM

Trial#3:

[multi-section survey]

Flow ran at 8/27/2020 11:41:17 AM

List record returns blank array

Flow ran at 8/27/2020 11:43:05 AM

List record returns an array successfully

List record returns with creation date 8/27/2020 11:42:32 AM

 

Thank you

Categories:
I have the same question (0)
  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @linsanity ,

     

    What is the Condition inside the Apply to each?

     

    Best Regards,

    Alice

     

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

  • linsanity Profile Picture
    6 on at

    Hi @v-alzhan-msft,

    It's included in the post. Here is the link.

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard