- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2023 03:13 AM - edited ‎07-05-2023 07:54 AM
Hi,
I have a "sys_template" (Incident template) for which I have made a new button.
It's actually the same button as hidden behind the hamburger- icon ("Insert and Stay").
Now I want this button to be available for only this specific template. I have tried several conditions within the button's UI Action, but nothing seems to work. How can I solve this problem?
I have tried:
- Condition = sys_id=a0a80ee597676110b4fbb1e3f245986f^EQ (does not work)
- Condition= template=[[OB]] -^EQ (does not work)
- Condition = name=[[OB]] - ^EQ (does not work)
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2023 06:06 AM - edited ‎07-04-2023 06:11 AM
@AdamUMC
current.getUniqueValue() == 'ur_template_sys_id'.So the Ui Action would only show on that particular template.
If my response helped please mark it correct and close the thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2023 05:57 AM
In template make sure you are trying to populate one particular field like correlation id = Template. So that it can be used as unique identifier for your ui action.
This field can be used in UI Action to make it visible for template only.
If this resolves your query, please mark it as correct or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2023 06:52 AM - edited ‎06-22-2023 07:05 AM
Thank you. And how this condition will look like then?
EDIT: BTW, SYS_ID of the template is a unique identifier as well. Why that does not work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2023 07:31 AM - edited ‎06-22-2023 07:33 AM
Because sys_id for each record in servicenow is different.
The template sys_id is to identified record uniquely on template table whereas you are trying to put conditions for incident.
You can use current.fieldname == "as per template value" in condition for ui action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 07:17 AM