Remove the first date after entering the eighth

Hello friends…

The objectif… is to keep the last 7 Dates on a data type I called DATA Mur.

That is to say: When I enter the eighth date, the old date (the first entered) is systematically deleted:

For this, I developed the following workflow:

I used: Delete First item

But the problem is that he sometimes suppresses the first 2 Dates!!!

To solve this problem, I must use the function: delete the minimum (ie the oldest date). As illustrated on the following workflow:

But it does not work…How to do please?

The easiest and fastest way to do this is to use a Database Trigger. Since I see that your date is saved to the database as a thing.

Go to your backend and setup a database trigger put a conditional on the trigger that is “only when do a search for DATA Mur:count>8” then the action to add is “Delete a thing” and the thing to delete is “do a search for Data Muir: sort by created date DESCENDING=no : first item”

That will solve your problem. Automatically immediately you save the 9th DARA Mur, bubble will delete the oldest DATA Mur

Thank you so much

This topic was automatically closed after 70 days. New replies are no longer allowed.