UI Action (button) for specific SYS ID

AdamUMC
Tera Guru

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!

1 ACCEPTED SOLUTION

@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

View solution in original post

26 REPLIES 26

Not yet, not really.

I just want to make this button available at the (unfinished) Incident template.
It's the template form before applying it to a (new) Incident. So an Incident has nothing to do with this. 🙂

AdamUMC_0-1687778738751.png
In the UI Action for the button, I should make a condition to achieve this.

AdamUMC_1-1687778832535.png

The SYS_ID that's shown here, is the SYS_ID of the (unifinished) template.

So what I want is:
1.) User opens a list view of all available Incident templates.

2.) User picks and opens this (unfinished) template, edits it by filling in several other fields.
3.) Then the users clicks at button "Insert and Stay". By clicking at this button, a new template is created without modifying the template from step 2.
NOTE: The "Insert and Stay" button should only be shown for the step 2 template.

Hi @AdamUMC 
Please try the below syntax.

VivinVerghese_1-1687780197409.png
https://docs.servicenow.com/en-US/bundle/utah-platform-administration/page/administer/form-administr...

If my response helped please mark it correct and close the thread

Thanks. Do I have to add this (with SYS_ID) in the condition- field?

Hi @AdamUMC 

Try with the below :

https://www.servicenow.com/community/now-platform-forum/programmatically-apply-a-template-to-a-form/...

current.applyTemplate("sys_id")

(or)
Try with Template Name

VivinVerghese_0-1687840939471.png

see that the template name is unique.

 

If my response helped please mark it correct and close the thread