- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I am investigating whether it is possible to create a button in the related list of a supplier case form within a workspace and control its visibility based on changes in the values of records within that related list.
However, I have not been able to implement this yet.
Furthermore, I was unable to implement this using Script Conditions or Record Conditions.
The values to be evaluated in the records are “Priority” and “State.”
Here are the Script Conditions I’ve tried:
current.state == 1 (Failed)
current.state == ‘1’ (Failed)
current.state != 1 (Failed)
current.state != ‘1’ (Failed)
current.priority == 1 (Failed)
current.priority == '1' (Failed)
current.priority != 1 (Failed)
current.priority != '1' (Failed)
parent.state == 1 (Failed)
parent.state == ‘1’ (Failed)
parent.state != 1 (Failed)
parent.state != ‘1’ (Failed)
parent.priority == 1 (Failed)
parent.priority == ‘1’ (Failed)
parent.priority != 1 (Failed)
parent.priority != ‘1’ (Failed)
current.getValue(‘priority’) == ‘1’ (Failed)
parent.getValue(‘priority’) == ‘1’ (Failed)
current.getValue(‘priority’) != ‘1’ (Failed)
parent.getValue(‘priority’) != ‘1’ (Failed)
current.getValue(‘state’) == ‘1’ (Failed)
parent.getValue(‘state’) == ‘1’ (Failed)
current.getValue(‘state’) != ‘1’ (Failed)
parent.getValue(‘state’) != ‘1’ (Failed)
current.getValue(‘priority’) (Failed)
I tried all of the above and verified the record conditions in the same way, but it didn’t work.
Since the “priority” and “state” fields are displayed when the button appears, it seems the system recognizes these fields themselves, but the values within them do not appear to be loaded.
If anyone has any insight into this issue or knows of a solution, I would greatly appreciate your help. Thank you in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @hamatu ,
I tested this scenario in my Instance using Declarative Actions and Dynamic Evaluation.
Interestingly, the condition works as expected when I use the Category field, but it doesn't behave as expected when I use the Priority field. Check for Category.
I've attached a screenshot showing the Category condition working as expected for comparison.
If you find this solution helpful, Mark this response as Helpful and Please Accept the solution.
Regards,
Sandesh Powar
ServiceNow Rising Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you want to control related list button visibility based on State of parent record?
If yes then in condition you should compare Parent record state and not current state
current.parentField.priority or current.parentField.state
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Regardless of the parent record's status, I want to control the display of a button based on changes in the values of records within the parent record's related list.
In other words, the parent record's values are irrelevant.
Is there a way to control the display of a button based on values within the related list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
so you are saying the related list button i.e. List Banner button on that table should be shown only for few states of that child record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @hamatu ,
I tested this scenario in my Instance using Declarative Actions and Dynamic Evaluation.
Interestingly, the condition works as expected when I use the Category field, but it doesn't behave as expected when I use the Priority field. Check for Category.
I've attached a screenshot showing the Category condition working as expected for comparison.
If you find this solution helpful, Mark this response as Helpful and Please Accept the solution.
Regards,
Sandesh Powar
ServiceNow Rising Star