Ui policy is not working

chandan31
Tera Contributor

Hi All,

 

I have created Ui policy in that future date should not allow , when i checked 31-7-2024 it is not allowing but when i selected 31-10-2024 it is allowing i do not future date only present date and past date should select .

 

chandan31_0-1722329287697.png

 

chandan31_1-1722329313804.png

 

2 ACCEPTED SOLUTIONS

Satishkumar B
Giga Sage
Giga Sage

Hi @chandan31 
I checked your scenario in my PDI it is working. please remove the alert message if any and try to put the after condition for you "work_start" field.

 

…………………………………………........................................................................................
Mark it helpful 👍and Accept Solution !! If this helps you to understand.

…………………………………………........................................................................................

 

View solution in original post

Robbie
Kilo Patron
Kilo Patron

Hi @chandan31,

 

Change the logic slightly. You're triggering the code when something is not true and then executing on reverse. Simply execute on true as below.

I've tested and confirmed this using the 'resolved_at' field on the incident form. Simply follow the below and update the field name in your script to 'work_start'.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.



Thanks, Robbie

 

Screenshot 2024-07-30 at 10.38.59.pngScreenshot 2024-07-30 at 10.39.07.png

View solution in original post

6 REPLIES 6

Satishkumar B
Giga Sage
Giga Sage

Hi @chandan31 
I checked your scenario in my PDI it is working. please remove the alert message if any and try to put the after condition for you "work_start" field.

 

…………………………………………........................................................................................
Mark it helpful 👍and Accept Solution !! If this helps you to understand.

…………………………………………........................................................................................

 

If i select back to back past date it is working but if i select back to future date it is not working .

if i move  past to future date than it is working .

 

Thanks and Regards,

Chandan Patra

Reverse it: date_field after today, if true, clearValue. The 'if false' probably checks what happens if it changes from being true to false.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Mark Manders
Mega Patron

Reverse it: date_field after today, if true, clearValue. The 'if false' probably checks what happens if it changes from being true to false.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark