- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 06:34 AM
Hi Team,
I want to put a condition on Cancel Request UI Action, this button should only be available/visible on RITMs whose Item belongs to the Service Catalog.
How write a condition on this Requirement.
Regards,
Abhilasha G T
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 06:53 AM
then update the UI action condition as this
give the correct sysId of Service Catalog
your existing condition && current.cat_item.sc_catalogs.toString().indexOf('e0d08b13c3330100c8b837659bba8fb4') > -1
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 06:38 AM
Hi @Abhilasha G T ,
On your existing UI action condition, just add " && current.cat_item.name != 'Your Item Name' "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 06:46 AM
Hi Sandeep,
Thanks for the reply,
having N numbers of catalog items, is this query will work.
Regards,
Abhilasha G T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 06:53 AM
then update the UI action condition as this
give the correct sysId of Service Catalog
your existing condition && current.cat_item.sc_catalogs.toString().indexOf('e0d08b13c3330100c8b837659bba8fb4') > -1
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 07:28 AM
if you want to check for catalog item names then do this
1) create string type system property and add catalog item name as comma separated values
2) update condition as this
existing condition && gs.getProperty('propertyName').indexOf(current.cat_item.name.toString()) > -1
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader