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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Deleting an Excel Row ...
Power Automate
Answered

Deleting an Excel Row without a Key Value

(0) ShareShare
ReportReport
Posted on by 6
Here is what I am trying to do...
 
User submits a Microsoft Form
User then receives a unique code from an excel list via email (the list is just 100 unique codes in an excel table)
That unique code is then deleted from the list so the following submission receives the next code on the list.
 
Everything is working for me as it should, except for the deleting the row part. I don't have a key value to specify since it changes every time.
 
The other option would be to update the list to show that code is used and create logic to not select that row for the next person? But I can't figure out how to make it work. I have tried so many things! Please help!! 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    I don't understand what you meant by:  I don't have a key value to specify since it changes every time. 
     
    If the code is present in a column let's say Code, then you can specify this column as key column and this code value as key value to make the row to be deleted from the excel file.
     
    Other approach would be to use an extra column which would be Yes/No type. So if the code is used, we will use update row to update that column with Yes and also while filtering the rows using list rows present in table action: we will be using filter query which filters out the rows if the Yes/No column type would be having value as No only so that it excludes already used codes.
     
     
    Hope this helps !
     
    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • EA-12112334-0 Profile Picture
    6 on at
    Thank you!
     
    To add clarity, we have 200+ unique codes so I wouldn’t want to update the process for each value.. does that make sense?
     
    I think what you are suggesting makes the most sense, but I couldn't get the “update row” functionality to work for me when I was trying. Can you help? Should the key value be 'no' and then it will update it to 'yes'.. 

    Here is a snippet of the excel file.. (ideally I would update the by: column as well to note the person who submitted the request)



  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    You should try this way for given excel template 
     
     
    I assume Used column has default value of No when adding a row.
     
    Now coming to flow design, after using form trigger and its associated actions, use list rows present in table action like below:
     
     
    Use the filter query to filter out the rows whose Used has value as No.
     
    Now use a condition action to check if there are rows obtained using list rows present in table action
     
    Expression: length(outputs('List_rows_present_in_a_table')?['body/value'])
     
    In yes branch - do the following 
     
    1. Perform the action you need to do after getting the promo code, to get promo code, use the following expression 
    first(outputs('List_rows_present_in_a_table')?['body/value'])?['Promo Codes'to get first occurance of promo code whose used value is No.
     
    2. Use update a row action to update row used and By: column with required values as shown below
     
    Here we use the Promo codes column as key column and value first(outputs('List_rows_present_in_a_table')?['body/value'])?['Promo Codes'as the key value to identify the row (assuming that promo code value is unique for each row). Now in Used column update the value as Yes and By: column update it as responder email address dynamic content coming as output from form's output as shown below
     
     
    Hope it helps !
     
    Mark it as solution if it solves your query !
     
    Thanks & Regards,
    Nived N
  • EA-12112334-0 Profile Picture
    6 on at
    Thank you so much for your help!! That seemed to work!

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard