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 / Get question names fro...
Power Automate
Unanswered

Get question names from Forms in Flow

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello

 

Is there a way to iterate though all questions in a form and get the questionname and answer into a array variable? I have a flow like this. I collect data from a lots of questions and would like to be able to iterate trough all columns in each answer to generate an e-mail (like a reciept) to the submitter of the form.

 

Screenshot of my flow:

 

 

Categories:
  • PieterVeenstra Profile Picture
    33 on at

    Do you get to the point where your Get response details are returned like this:

     

    FormsResponses.PNG

    The answers are in the details as you see above. You could now query the above data with those long strings made up of letters and numbers but that isn't very flexible.

     

    Adding a select action might already help a bit so that you can query by these unique question ids and convert them into more textual representation.

     

    You could also use John Liu's xpath workaround to step through all the answers:

    http://johnliu.net/blog/2017/11/foreach-property-in-microsoftflow-json-with-xpath-microblog

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks Pieter

     

    Yes i have noticed the long strings and i assume they represent some internal id that Forms/Excel uses to identify the connection between the question and the column in excel?

     

    But i dont understand how to use them? What should i query using them? Can i send some query to the excel-file to recieve the column name from that ID? I want to make a generic solution that can be copied and applied to multiple forms (with different setup of questions), so adding the column names manually in a select action won´t help me so much.

     

    The xpath trick will help me on the way definately. Thanks a lot for that one!

     

    Regards

     

    Mike

     

     

     

     

  • PieterVeenstra Profile Picture
    33 on at

     

     

    Something like this shoudl work:

     

    body('get_response_details')?['whatever_the_long_id_is']

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks again Pieter!

    I tried that, but it only returns the answer to the question, not the name of the question.

     

    Anyway now i have tried to get a grip on how to use the xpath-trick. I am stuck on the last step where the result is mapped in the select action. In the example you linked only the column names are stored in the final array.

    I would like to go from this (where i am right now)

    {
     "root": {
     "a": 1,
     "b": 2,
     "c": 3
     }
    }

     to this

    [

    1,

    2,

    3

    ]

     

    Instead of as in the example:

     

    [
     "a",
     "b",
     "c"
    ]

     

     

  • PieterVeenstra Profile Picture
    33 on at

    Hi @Anonymous,

     

    I don't think that you can get to the actual question. Only the answers.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Any update on this?
    I need to get Forms' question into a string variable.

  • Mazzels Profile Picture
    5 on at

    Two years later... Any updates? I have the exact same problem.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Customer Voice (aka Forms Pro) has this all sorted out. It just isn't in the free version. With Customer Voice you can also just go through all the data in your dataverse databases.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hello i want to ask how did you get the Id in the seconed parameter?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard