Hello ,
I have order and i have 5 status
1-request 2-incoming 3-pending 4-late 5-deliverd
in page pending i want if the order late 3 days the status is change to late
in table i have attribute created on and i want check with date time now
how i can implement ?
>Create a server action.>Add an aggregate to filter(as shown below) all the orders which have created date time more than 3 day andonly those orders that are having pending status.
DiffDays (Order.Creation_Date , CurrDateTime()) > 3 and Order.status = Entities.status.pending
>Then loop over the list return from aggregate and update all the order's status to late.>Then use the server action inside timer and schedule it as per requirement.
Hi,
you can use datetime function and pass the number of days according to your requirement.
you can also refer below post for reference. let me know if still have any query.
https://www.outsystems.com/forums/discussion/37848/date-validation-on-if-condition/
Thanks
CV
Hello @moheman aldulimy,
I hope you are doing well.
You can apply a filter with the built-in Date and Time fuction DiffDays() to check that difference:
If(DiffDays(CurrDate(), {Entity}.[Attribute]) > 3, ChangeStatus, DoNothing)
Best regards,
Miguel Figueiredo
Hi Moheman
Create a timer and use it to update the status if the order is having created date time more than 3 day then change the status to late.RegardsKrishnanand Pathak
can you send logic image