Catalog UI Policy relative Condition for Date field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2016 11:16 AM
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
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2016 11:44 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2016 12:04 PM
I have to go with client scripts only.