Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Run an update query on a List e.g. only keep recent records

alexbcf
Level 1
Level 1

Hi all,

I have a List. I want to create a workflow that runs daily and only keeps records in the List that are 30 days young (I have a "created" column).

I could potentially, read List, then select last 30 days and save again (deleting existing records).. but I am afraid that while this runs I might miss records that have been added between start and end of this flow.

Is there an easier more standard way to delete older records?

1 Accepted Solution
Vapsy
Correct answer by
Employee
Employee

Hi alexbcf,

There is no out of the box functionality which you can use.

The workaround that I can suggest is, give the power to purge a list to the same workflow that creates the list.

Once a day on that workflow, before starting the transition that go ahead with purging 30 days older data and once it has done by reading list, identifying data which is within the last month, scope, merge it with the new data that should be part of this list using Union activity, update the list using the condition delete and recreate the list.

Regards,
Vipul

View solution in original post

1 Reply
Vapsy
Correct answer by
Employee
Employee

Hi alexbcf,

There is no out of the box functionality which you can use.

The workaround that I can suggest is, give the power to purge a list to the same workflow that creates the list.

Once a day on that workflow, before starting the transition that go ahead with purging 30 days older data and once it has done by reading list, identifying data which is within the last month, scope, merge it with the new data that should be part of this list using Union activity, update the list using the condition delete and recreate the list.

Regards,
Vipul

View solution in original post