cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SerhiiK_
New Member

Build Update Excel row with conditions

Hi community,

Could you please help to resolve my issue?

 

I'm trying to build the following flow.

- Answers from Microsoft Forms are sent to Excel Online.

- Based on some conditions it should update a row or add new row to my table.

 

The conditions are the following:

- If record doesn't exist - create new record;

- If record(s) exists and status is in (Done, Canceled, On Hold) - create new record;

- If record(s) exists and status is not in (Done, Canceled, On Hold) - update record.

 

For me challenge here is that there are several rows can be present in the Excel that need to be updated. 

 

Here is my flow:

Once I get an answer from my form I'm checking if the record for this user already exists in the table

SerhiiK__0-1647267709395.png

 

Return this as an array and add a condition to add new row or update a row:

SerhiiK__1-1647268208894.png

 

Issue is with "Yes" branch -> Update a row:

SerhiiK__2-1647268919147.png

I'm trying to find rows that match requestor names and updates only some of them that aren't done.

But now it updates only the first row.

 

Here is my table example:

SerhiiK__3-1647269359520.png

Based on the desired outcome:
Rows 1396, 1397, 1398 shouldn't be touched.

Rows 1399 and 1400 should be updated.

5 REPLIES 5
KvB1
Solution Sage
Solution Sage

Basically you need to be able to filter a row on 2 key columns, which isnt possible directly.

 

You can either use a sharepoint list to store your rows rather than an excel list, which will give you many more options since every row will have a unique ID

 

You can also create a new key column where by concatenating the other 2 columns, and use that to filter on

KvB1
Solution Sage
Solution Sage

Basically you need to be able to filter a row on 2 key columns, which isnt possible directly.

 

You can either use a sharepoint list to store your rows rather than an excel list, which will give you many more options since every row will have a unique ID

 

You can also create a new key column where by concatenating the other 2 columns, and use that to filter on

I need to have it in Excel since some data in the table is updated manually and as well used for reporting purpose, e.g. Pivot Tables.

 

About concatenating:

Ok, I can create concact column where I can store name+status. It can contains duplicate rows anyway, e.g. First1Last1New.
Does it mean that in this case it wouldn't be possible again and I need to have some auto-generated ID, e.g,?

KvB1
Solution Sage
Solution Sage

I'm afraid I don't know, I try to avoid using excel when using automate, but I think its possible

If I'm using an unique timestamp, could you please help to update the flow in this case? How it should look like for multiple rows and complex condition (Name+Status) matching?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,040)