Catalog UI Policy relative Condition for Date field

kailashthiyagar
Kilo Guru

I m using relative condition in one of the catalog Item UI policy.

Requirement is "If the selected date is within 7 days from the date when the request if opened, i need to display an alert message"

Here is the condition which i used

Relative Condition.jpg

It works fine on the Catalog Item View. But when it comes to requested item(I mean the RITM itself), relative condition doesnt sound to be working properly. Also, if someone opens the RITM at a later date(may be next month), then the condition evaluates to false

P.S : I can make the UI to apply on the Catalog item view alone and not on the requested item/tasks but that was not my requirement.

2 REPLIES 2

Chuck Tomasi
Tera Patron

Hi Kailash,



I suspect the issue is that these are variables, which work great on Catalog UI Policies, but not so well on Requested Items. I don't see a way to reference the variables from a standard UI policy, only fields. Which means, if you want to manipulate the form based on these values, you may have to do it through client script (which I'm not sure if it has access to variables) or add the variables to sc_req_item table so a UI policy recognizes. The downside of the latter is that those fields will be available to ALL request items regardless of the original catalog item. 😞



Creating a UI Policy - ServiceNow Wiki


Service Catalog UI Policy - ServiceNow Wiki


Client Scripts - ServiceNow Wiki


Service Catalog Variables - ServiceNow Wiki    


I have to go with client scripts only.