Flow designer script for date validation

srujana2
Tera Contributor

Hi All,

I have a table in that there is field due date(date/time).

task is when a user is selected date/time on that field, once the date/time started then i have to update the fields.

ex.  today is  20 dec and user selected dec 30 in that due date field, when that selected time(30 dec) occurs then only i want to set the values.

I have written Flow designer wait for condition script, but  then update record but not working as expected.

code:

if(fd_data.trigger.current.due_date.getDisplayValue() == new GlideDateTime().getDisplayValue){
    return true;
}
 
@Ankur Bawiskar  can you guide me
Thanks.

 

 

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

You need to write a flow which would trigger everyday. a Scheduled Flow, which will lookup records which are past due date (Due Date is Before Today), and set values for those field.


Please mark this response as correct or helpful if it assisted you with your question.

Appanna M
Tera Guru

Hello srujana2,

Try this below logic added to your flow designer. You no need to write any script for that validation (i.e wait for the date time duration mentioned in a variable) instead you can simply configure the same in the "Wait for a Duration of time" Action under the Duration Type - relative duration then add your duration variable from the data pill picker.

After that you can set/update your values. 

Attached sample screenshot.

 

Please Mark my answer as Helpful, if its resolves your issue.  

 

Regards,

Appanna.