cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kingsley_James
Level: Powered On

Using specific records in Excel file

Hi.

 

I'm not sure if this is the correct place to ask questions.

I have just started using Flow and struggling with validating data. I need to:

1. Load an excel file (All rows) - This is done

2. Condition: If variable1 (for example) exists in the Email column in the above loaded Excel file. - Not done

       true: Get RowID - not done

       false: insert record - This is done

 

If it wasn't clear enough, I need help with the parts that say "Not done".

 

Many thanks

Kingsley

1 REPLY 1
Community Support Team
Community Support Team

Re: Using specific records in Excel file

Hi @Kingsley_James ,

 

Do you want to check if a record exists in an Excel table, if yes, get row id from the Excel, if not, insert a row in the Excel table.

Please check if the following scenario will work for you.

When an item is created in SharePoint list, check if it already exists in Excel table, if yes, get the corresponding row, if not, insert the item in the Excel table.

Add the trigger When an item is created.

Initialize a String variable named as Rows.

Get rows from the Excel table.

Add an apply to each, get value from the action Get rows, then add Append to string variable action within the Apply to each, select dynamic content name for the Value field.

Note: name is one of the column in my Excel table.

Under the Apply to each, add a Condition to check if variable Rows contains Title from the trigger.

Under if yes branch, add Condition2 to find out the specific row with Title is equal to name. Then Get row under if yes branch.

Under if no branch, insert row in the Excel table.

Images for your reference.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,832)