- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 07:44 AM
Hi everyone, how are you?!
I want to hide a record from a related list when the state is "Pending"
I tried using a UI Policy:
Condition:
state is pending (print 1)
I also tried using the Script (print_3):
it is not to show the records when the state is "Pending".
Could anyone give me a tip or help me?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 08:35 AM
From what I know so far I don't think there is a way to hide a record in related list but either remove or filter it out.
If you want to remove it you will have to delete the record, you ca take a look at this link below:
However I can see the condition of removal is not triggered from the main table but the related list table itself, state changed to pending. For that I would suggest adding a filter in the related list itself and then setting it as default, however it can be easily removed from the breadcrumb by anyone which will remove the filter entirely.
If this response clears up your doubt, kindly flag it as both helpful and correct.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 08:39 AM - edited 11-03-2023 08:40 AM
A ui policy wont work, you have to create a server side script.
You can also change the default filter of the related list, This is also a good option. See this -> https://docs.servicenow.com/bundle/tokyo-platform-user-interface/page/use/using-forms/task/t_CreateA...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 08:35 AM
From what I know so far I don't think there is a way to hide a record in related list but either remove or filter it out.
If you want to remove it you will have to delete the record, you ca take a look at this link below:
However I can see the condition of removal is not triggered from the main table but the related list table itself, state changed to pending. For that I would suggest adding a filter in the related list itself and then setting it as default, however it can be easily removed from the breadcrumb by anyone which will remove the filter entirely.
If this response clears up your doubt, kindly flag it as both helpful and correct.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 08:59 AM
Mark my answer Helpful & Accepted if I have answered your question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 10:28 AM
Hi @aKartik , how are you?!
It's working, I used the filter on the related list (state is not pending). Thank you all for your help!
Thank you!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 10:31 AM
No problem. 🥂