web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Delete line by a key

(0) ShareShare
ReportReport
Posted on by 30

Hello guys,

 

I have two Excel lists. One list comes from the colleague, the other one is for monitoring.
The list from the colleague should be searched for the column "Decision". Possibilities are "new", "delete", "update".
If the cell says "delete", I want to delete this row in the monitoring list.

Certain values may appear more than once in the monitoring list. Therefore I need to compare according to a key
(ID, project name, cost center).

The row with the ID, project name, cost center should be deleted in the monitoring list.

 

is it possible to specify multiple columns in the lead column? If so how do I separate the columns?

MaiD_0-1696517411727.png

At the moment my flow looks like:

  1. first loop over the list from my colleague.
  2. case condition: "new", "delete", "update"
  3. case delete: loop over my monitoring list
  4. if condition: If ( ID, project name, cost center from the list of my colleague == ID, project name, cost center from the monitoring list)
  5. yes -> Delete row with the ID

This works so far but takes a long time. I suspect it is because of the two loops nested Applay to each.

 

Thank you for helping 🙂

Categories:
I have the same question (0)
  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at
    Re: Delete line by a key

    Apply to each and conditions inside is never a good idea. You should try to filter the relevant rows with “filter array”. Maybe xpath can be useful too.

     

    If you provide sample data (please JSON and not screenshots) and desired output, I will provide a solution without loops (except the one you need to delete the rows).

  • MaiD Profile Picture
    30 on at
    Re: Delete line by a key

    Hi Matthy79,

     

    there is the first problem. i dont know how to create a JSON file from my Excel.

    My idea is:

    1. Loop over the List
    2. Case condtion 
    3. Create 3 JSON files after the column "decision" should be decided
    4. Now i will have 3 JSON files (with "new", "update", "delete") <- Here I am struggling right now
    5. then all three JSON are to be processed in parallel. Depending on the list

    What u think about this way?

     

    BR 

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at
    Re: Delete line by a key

    As I said. Loop and condition is never a good choice. You don’t have to create the JSON I requested. The output of “List rows” is a JSON. You can see and copy it, if you check the flow run history.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard