Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Adding conditions and variables to flow

(1) ShareShare
ReportReport
Posted on by 4

I'm sure this question has been asked but I'm having trouble locating an answer applicable to my situation. My team and I are using Forms to generate data into Excel tracking case updates. I'm attempting to add a condition/variable to my flow to update existing rows for Reg numbers that are already in the table, while still allowing new rows to be added if a new Reg number is added. If someone can share a step-by-step that would be very much appreciated. 

  • M3vswrld Profile Picture
    4 on at
    Re: Adding conditions and variables to flow

    I only used one condition and added variables. Reg num is not equal to null- if yes, update row, if no, add row. Then I went further to add more variables to say, if the form field is blank keep input in table. It was definitely a brain tease, but I had help from a very smart co-worker.

    M3vswrld_0-1697681902531.png

    M3vswrld_1-1697681997116.png

     

     

  • trice602 Profile Picture
    13,817 Super User 2025 Season 1 on at
    Re: Adding conditions and variables to flow

    Hi @M3vswrld ,

     

    I found a solution I wrote awhile back that is really close to your scope of work.  Here's the flow.

     

    My first condition (which may not be applicable to yours, is to check if one of the form answers was Supplier.  I'm going to describe all the steps even if they don't specifically match yours so you understand the entire flow.  But I do cover update a row or add a row...

     

    trice602_0-1697249492887.png

     

     

    Let's assume that the form response was Supplier, so on this side of the conditional block, I have this group of actions.  Here I want to check if the company name is already in my excel sheet.  So the first action is to list rows present in a table (I want all rows).

     

    Next in my Condition 2 action, if the form response question Enter your company name = the excel column "Company Name" ...

     

    I will update a row or if not found, add a row.

     

    trice602_1-1697249669936.png

     

    Now, on the Update a row action, you need to specify a Key column.  I used Company name.  From here, it's just populating both actions with the dynamic content from your Get responses action, shown below.

     

    trice602_2-1697250059388.png

     

    To summarize, you don't need the first conditional action that has the "Supplier", you would not need that one.  Your conditional action to check Regs numbers would go where I check the company name (Condition 2).

     

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1