Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to create a script where condition is based on time difference in minutes?

Aditya Sinha
Tera Contributor

I have two fields A and B of date time format in my catalog items. I need to implement 2 criteria- 

 

1. Entry in field A has to be at least 15 minutes ahead of current time. 

2. Entry in field B has to be at least 30 minutes ahead of entry in B. 

 

I am thinking of using a UI policy each to implement these 2 conditions and would appreciate help in the script for them. 

 

Thanks!

1 REPLY 1

Saurabh Gupta
Kilo Patron

Hi,
You can create the UI policy as below
Field A relative After 15 minutes from now.
And Script execute if false
Clear Value of Field A with a message.





Thanks and Regards,

Saurabh Gupta