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 / Power Automate Conditions
Power Automate
Suggested Answer

Power Automate Conditions

(0) ShareShare
ReportReport
Posted on by
Hello,
 
I am new to Power Automate and am attempting to create a flow using the 'Store Microsoft Forms responses in a SQL Server table' template. I have a form with a question (choices) that allows the user to select one of five options. I created a table in my SQL Server with the corresponding choices and set the default value to 'No.'
 

Basically, I want to insert a new row into my SQL Server table with the value the user selected. For example, if the user picks A, the new row should look like this:

A B C D E
True False False False False"

 
Thank you!
 
Categories:
I have the same question (0)
  • Suggested answer
    rzaneti Profile Picture
    4,491 Super User 2026 Season 1 on at
    Hey,
     
    I believe that the approach below can help you. 
     
    For this example, I'm using the following Form, which contains a single question and the choice answers (single choice only) from A to E:
     
    The responses must be loaded in this Excel table (from your end, the process may be a little different, since you are using a SQL table):
     
    In Power Automate, I'm simply capturing the Form responses and loading it to the Excel table, with an expression to handle the scenario for each column:
     
    The expressions are pretty much the same: I'm using equals(outputs('Get_response_details')?['body/r3ae835a961be4529b8971a7c84836c82'], 'A') for the a input, and just changing the text in red for the others, in order to match each character from B to E. From your end, you must also replace the text in blue for the dynamic content of the question that you want to track:
     
    In summary, we are using the equals() expression to test if the question's answer is equal to 'A' (or to 'B', or 'C', and so on). Since the equals() expression returns a boolean output, your flow will automatically populate the marked answer as true and all of the others as false. After a few random submissions, this is the outputs in the Excel table: 
     
    Note 1: Power Automate is case sensitive, so make sure to keep the same format from your response in the equals() expression. If I used 'a' instead of 'A', it would not work.
    Note 2: If the choices are not simply a single letter like in my example, you can use some text expressions to extract the letter from the selected choice. Check the content below for more details.
     
    Knowledge base
    Since you mentioned that you are new to Power Automate, I'm sharing some blogs that I wrote about topics discussed here, which can be helpful for you or anyone that finds this thread in the future:
    - Populating Excel table from MS Forms submission with Power Automate: http://digitalmill.net/2024/11/04/populating-an-excel-table-from-a-microsoft-forms-submission/ 
     
    Let me know if it works for you or if you need any additional help!
    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.
     
     
  • rzaneti Profile Picture
    4,491 Super User 2026 Season 1 on at
    Hi,
     
    I just want to confirm if you had a chance to test the solution recommended in my previous message.
     
    If it's working properly and answered your question, please mark it as Accepted Answer, so other users with the same issue can find it easily in the future :)
     
     
    -------------------------------------------------------------------------
     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard