- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 05:03 AM - edited 03-20-2025 05:04 AM
Hi Team,
on problem we have a field region drop down (1usa 2 Europe) and in related list we have "change requests" in that we have "ADD" button we need to hide the 'ADD' button when region is USA and show when region is Europe can anyone suggest how to achieve this there is no omit option for "ADD" in list control and when i am checking in UI actions it is in change_request table .how can fetch problem field values on that UI action is it possible to do this..?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 10:19 PM
parent object should work
parent object -> will be the problem record
See here, I was able to show the Add button only for PRB0000011 and hide for other problem
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
03-20-2025 05:14 AM
Hello @Shabbir1
Yes, you need to write server side script. I am assuming if change request related list is appearing in problem, there must be a field which is connecting them. For eg- Problem can be parent of change request.
In that case, you can easily dot walk in your UI action.
Like - current.parent.region== 'xyz' (specify the region value here - then ADD button should come per your requirement.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 05:22 AM - edited 03-20-2025 05:24 AM
update this OOB UI Action and add this extra condition which I highlighted in bold
ensure you give correct field name and choice value
RP.isRelatedList() && current.canCreate() && parent.active == true && (gs.getProperty('com.snc.task.add_change_request').split(',').indexOf(parent.getTableName()) > -1) && (parent.getTableName() == 'problem' && parent.region == 'europe')
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
03-20-2025 08:06 PM
Hope you are doing good.
Did my reply answer your question?
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
03-20-2025 10:08 PM
Hi @Ankur Bawiskar Thank you for your response we are getting parent only when we are adding the ticket in the related list "change requests" otherwise parent is empty so in this case we care not able to fetch "parent.region"