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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need a script to autom...
Power Automate
Unanswered

Need a script to automate removing older listings based on 'Return Date' in Excel on Sharepoint

(0) ShareShare
ReportReport
Posted on by 2

KennethM87_0-1657194689151.png

Hello,

I am needing to create a script to automatically remove an entire row(s) within an entire table based on the 'Return Date' in my document. For an example on what my document looks like, I have attached a screenshot (above).

 

Essentially, I am needing a script that automatically removes an entire row if it is earlier than today's date (whatever day that is). I have been trying to use the 'record' option so the script can read my commands, and I can get it to delete a row, but it is not doing exactly what I need it to do. Any assistance is much appreciated.

Categories:
I have the same question (0)
  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at

    Hello @KennethM87 ,

    after using the Action "List rows present in a table", please follow these steps:

    MarconettiMarco_0-1657211613309.png

    1. in a "Compose" action, format your Return Date value using an expression like "formatDateTime('<your_value>'),'yyyy-MM-dd');
    2. Condition: if the Outputs of your previous Compose action is less than today (use an expression like "formatDateTime(utcNow(),'yyyy-MM-dd')"), Delete the row.

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    BR,

    Marco

  • KennethM87 Profile Picture
    2 on at

    I am still new to scripting, so please forgive me. I inputted the same information you gave me, minus adding my tables & documents for the script to reference, but I am getting this error when I save the script:

    KennethM87_0-1657214326193.png

    I know you stated that I need to put my value into this section, but I am honestly not sure what I would input there for the script to reference. I really appreciate you helping with this. 

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard