Scheduled execution on RITM

AshutoshaP
Tera Contributor

I have a Service Catalog item with a variable named “Requester”, which includes a choice option called “Ad-hoc”. There are also two date/time variables: Start Date and End Date.

If the Requester = Ad-hoc, and the duration between the Start Date and End Date exceeds 24 hours, then a related record from a specific table (linked to the user) should be automatically deleted.

I already have a Flow Designer flow for this catalog item handling other operations. could any one please assist me with the scenario. 

3 REPLIES 3

Deepak Shaerma
Mega Sage

Hi @AshutoshaP 

Flow looks like : 
1. Get Catalog Variables
2. If requester is adhoc and end date is greater than start date (click the fx (Transform) icon next to the Start Date data pill and select Date/Time > Add Time and set the transform value to Days: 1 (or Hours: 24).
3. Look Up Record (select your specific related table and map the reference field on this table to the relevant user. For example: [User Field] is [Trigger -> Requested For])
4. Add an Action -> Delete Record 

Happy to help! If this resolved your issue, kindly mark it as the correct answer   and Helpful and close the thread 🔒 so others can benefit too.

Warm Regards,

Deepak Sharma

Community Rising Star 2025



 

Hi Deepak , the flow will get triggered with a condition on any catalog but i want the operation to be specific on  a table based on  two variables from the catalog .

Nilesh Pol
Kilo Sage

@AshutoshaP You can handle this cleanly inside your existing Flow Designer flow, no need for a separate script job unless you want async cleanup.

use below algorithm:

When: Requester = "Ad-hoc" and Duration (End Date – Start Date) > 24 hours.

             Then, Run Script (Action) to find related record (from your custom table) and delete it.

Take a try at your end first or let us know you stuck.