cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Add Rows to table based on response of Microsoft forms

Dear Friends,

 

I am beginner to design of power automate flow and this is my first flow that I have prepared by putting too much hard work. I am in need of your help into implement large power automate flow from already designed small test flow that running successfully.  I am updating excel table based on response from Microsoft forms. 

 

QC sheet that i am updating based on forms response.

 

Rajpatelb86057_3-1707148158564.png

 

i am using Microsoft forms to update to QC sheet. Initial value for Drug, Event, Narrative, Patient, Report, DCandRC and Labelling are same for all that is 1. if user select Drug from drop down of Error1 then value should be converted to 0 for Drug and for rest it should remain 1 as per first row shown in QC sheet.

Rajpatelb86057_1-1707147794245.png

 if user select DCandRC  and Report from questions of forms and then value should be converted to 0 for both DCandRC  and Report and for rest 05 value should remain 1 as per last row shown in QC sheet.

Rajpatelb86057_2-1707148065272.png

 

i have successfully implemented this for 07 QC parameters as described below in explanation of my test flow. i have total 188 QC parameters in my real case.

 

first have set initialize variables for 07 QC parameter (1 for all)

 

Rajpatelb86057_4-1707148433637.png

then i have use switch action for question named Error1 that set variables to 0 based on answer of Error1.

Rajpatelb86057_5-1707148526700.png

then I have use switch action again for Error2 and inside switch action used composed action to prevent variable (already set at 0 in Error1) to reset again at 1 in Error2 then set variable based on answer of Error2. same switch for further Question like Error3 and Error4.

 

Rajpatelb86057_6-1707148683602.png

And then finally add a row into table.

 

Rajpatelb86057_7-1707149186209.png

This small-scale flow running successfully. I need your support to implement this flow in my real operation that have 188 parameters like Drug, Event, Narrative, Patient, Report, DCandRC, Labelling and so on and 10 question like Error1, Error2 to Error10.

 

it would be great help for me if someone guide me best approach in this regard as setting 188 initialize variables for 188 QC parameters and 188 cases under switch action are not possible.

 

Thank you in advance. 😊

 

@creativeopinion   @grantjenkins     @ManishSolanki   @Pstork1  @trice602    please help.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Here's a short POC of the method I used to get the array of variables where all are set to 0 except the one that matches the answer.

image.png

1) Use the Form Submitted Trigger

2) Create an array variable with all the values and their Indexes.

3) Get the response details.

4) Use a Data Select to generate an array of 1's and 0's. If the value property in the array is equal to the response use a 0 otherwise use a 1.

5) The resulting array is a list of 7 values where the value that matches is 0

 

This was the result when I picked Patient, which is the 4th response. 

[
  1,
  1,
  1,
  0,
  1,
  1,
  1
]

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Hi @Pstork1  thank you for your time and suggesting techniques. i manage to create var Array and selection action that gives desired results.

Rajpatelb86057_0-1709098532314.pngRajpatelb86057_1-1709098642306.png

 

View solution in original post

16 REPLIES 16

Hi, can anyone please help me to manage 188 variables?

 

Pstork1
Most Valuable Professional
Most Valuable Professional

If you absolutely have to you can get 188 cases under a switch. Use a switch for the first 25 cases and then add another switch in default for cases 26-50. Another switch in the default of that switch will get you 51-75, etc.  But that wouldn't be a very good way to do it.  Instead I would suggest seeing if you can get the values to produce an index 0 to 187. I haven't looked to see if the index is available from the dropdown in Forms or not. If it isn't you may have to build a JSON array with all the potential values and their associated Index number. Then use a filter Array to match the value returned from the form to the one in the Array. Once you have the Index you can use the Index to set the value in another 188 member array to 0. Then use that array to populate the row in Excel. If that process isn't clear from the description let me know and I'll put together a small flow proof of concept.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thank you for your response!! @Pstork1  

 

i will not be able to build flow from your description as i am new to power automate. kindly put small flow with JASON array. i have simply 188 drop downs in questions of Microsoft forms. first i want to initialize variables for 188 QC parameters as 1 then based on answer set it to 0. once any variables set at 0 then it should not again set to 1 from answer of subsequent question of forms. And then add row to table in excel. thank you in advance.

Here's a short POC of the method I used to get the array of variables where all are set to 0 except the one that matches the answer.

image.png

1) Use the Form Submitted Trigger

2) Create an array variable with all the values and their Indexes.

3) Get the response details.

4) Use a Data Select to generate an array of 1's and 0's. If the value property in the array is equal to the response use a 0 otherwise use a 1.

5) The resulting array is a list of 7 values where the value that matches is 0

 

This was the result when I picked Patient, which is the 4th response. 

[
  1,
  1,
  1,
  0,
  1,
  1,
  1
]

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Dear @Pstork1 ,

 

Thank you for reply.

 

i am facing difficulties in select action as shown in below screenshot.

Rajpatelb86057_0-1707242566849.png

 

 also kindly guide me how to set resulting array in add a row into table action.

 

Rajpatelb86057_1-1707242623030.png

Thank you😊

Can you show me the array you setup as a variable?  In my screenshot you can see that it has a property for each entry called Value.  The other side of the equals is the dynamic content from the response.  YOu need to pick that from the list.  It looks like you are using the one from my form.

 

For the entries you'll use the index array of the values you are creating.  So each value in the list will be set to something like this.

body('Select')[3]

The number inside the bracket is the 0 based index of the value in the array. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

please see below setup of variables and Select action.

 

Rajpatelb86057_0-1707244304577.pngRajpatelb86057_1-1707244325710.png

@Pstork1 

Instead of outputs('Get_Response_Details')?body('Get_Response_Details') you need to pick the answer to the question where they are picking the value from the dropdown in the form.

 

You should also use the Icon to the right of the mapping to switch the data select to just map values and not keys, since you want to leave the key blank.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

i have selected dynamic value of questions Error1, Error2 and Error3 in select action but still invalid. please see my forms that have questions Error1, Error2 and Error3 with same dropdown.

 

Rajpatelb86057_0-1707245437026.pngRajpatelb86057_1-1707245453077.png

@Pstork1 

You need to do one question for each row.  Error1 answer will be one entry, Error2 will be another and Error3 will be the third. You are trying to do all of them in one row.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 ,

i will have first 5 questions as shown in below forms screenshot that should go as it is in excel. then rest 10 question like Error1, Error2 to Error10 with same dropdowns of 188 QC parameters like Drug, Event and so on. if user select Reporter in Error1 and DCandRC in Error3 then value should be 0 for both Reporter and DCandRC and for rest 186 should be 1 (Second Last row of excel with case ID BR456). if user don't attend Error1, Error2 and Error3 then value should be 1 for all 188 QC Parameters (Last row of excel with case ID Ind123).  is this type of set up possible with power automate flow?

 

Rajpatelb86057_1-1707294412952.png

Rajpatelb86057_2-1707294966534.png

 

Thank you in advance.😊

 

It should be possible using the procedure I showed you above. But the formula in the data select field will be much more complex since you have to set 0,s for multiple conditions.  Where you are using the equals() function today you'll need to add up to 9 more equals() clauses and put them all inside an or().



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Dear @Pstork1 ,

 

thank you for your response.

 

it will be ok for me. can you please guide me step by step with action with dynamic contents plz? it would be great help for me.

I've already shown you all the techniques you need for this. But I think the complexity is beyond what you will be able to do at this point given your knowledge and experience.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Dear @Pstork1 ,

 

i tried hard with techniques you suggested but unfortunately it count not able to make it. But i am able to get data in Excel A from Froms. is it possible to transfer that data to Excel B as shown in screenshot?

 

Rajpatelb86057_0-1707324548193.png

 

 Thank you for your time.😊

Hi @Pstork1  thank you for your time and suggesting techniques. i manage to create var Array and selection action that gives desired results.

Rajpatelb86057_0-1709098532314.pngRajpatelb86057_1-1709098642306.png

 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (624)