Catalog UI Policy Not Saving When "Before" Used on Date Condition

IDewar
Tera Expert

Hi there,

 

Got a bit of a strange one. I am looking to add a Catalog UI Policy onto a portal Request Item so that it won't take a previous date. However, when I try to set the Condition on the UI Policy to be "[date_field] before Today", when I save it the Condition just resets back to being blank without any error messages. 

 

I am able to put "After Today" in the condition but not "Before". The field is in a Variable Set but this still happens whether I put the UI Policy on the Item or the Variable Set.

 

Any help on figuring this one out would be most appreciated.

 

Kind Regards,

 

Iain 

 

 

 

 

1 ACCEPTED SOLUTION

Brian Lancaster
Tera Sage

I think you are going to need to use a script include and client script instead of a UI Policy for date validation.

https://www.servicenow.com/community/in-other-news/auto-populating-and-validating-date-fields/ba-p/2... 

View solution in original post

4 REPLIES 4

Akash4
Kilo Sage
Kilo Sage

Hello, 

If I understood correct, the UI Policy form is not saving with the Condition you gave even before reaching in configuring the UI Policy Action.

Can you share any screenshot of this Policy and confirm if its Date or Date/Time field.

 

Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.

Brian Lancaster
Tera Sage

I have tested this in my PDI and having the same issue. It happens for both date and date/time fields. I set it like below

BrianLancaster_0-1727195958458.png

but as soon as I save the record it shows like this.

BrianLancaster_1-1727196010873.png

 

Brian Lancaster
Tera Sage

I think you are going to need to use a script include and client script instead of a UI Policy for date validation.

https://www.servicenow.com/community/in-other-news/auto-populating-and-validating-date-fields/ba-p/2... 

Thank you for checking this for me. It was never something we really needed, just something that would have been nice to have. If my manager feels it is needed, we can move to doing this through scripting.