We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Show UI Action form button during choice field on change

Andrew48
Kilo Explorer

Hello Snowers,

I have a UI Action form button "Send Notification", which has to be shown only when a certain value is chosen from the status choice list. 

I have provided the condition but it is working only when the form is loading. is there a way to make this happen without saving the form and reloading it.

find_real_file.png

The UI Action i configured.

find_real_file.png

Also a clarification, does the UI action form button gets executed only during a form load?

10 REPLIES 10

Priyanka136
Mega Guru

Hi Andrew,

Please refer the below link it might be helpful:-

https://community.servicenow.com/community?id=community_question&sys_id=2cf54361db1cdbc01dcaf3231f96...

Let me know if you have any question !!!

Thanks,
Priyanka

 

Hi Priya,

Thanks for your response.

I tried using the same code in a client script, as there was a onchange client script present already, 

Even after i checked the isolate script check box, i am facing the below error.

TypeError: $$ is not a function function () { [native code] }

I used this code "$$('send_notification')[0].show(); "

kindly help.

Hey Andrew,

Make "Isolate" checkbox to false then try to execute.

Thanks,

Priyanka

Andrew48
Kilo Explorer

Hello,

Thanks for your response.

I tried using the same code in a client script, as there was a onchange client script present already, 

Even after i checked the isolate script check box, i am facing the below error.

TypeError: $$ is not a function function () { [native code] }

I used this code "$$('send_notification')[0].show(); "

kindly help.

Hi Andrew,

Isolate script field should be set to false;

Also can you try

$('send_notification')[0].show();

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader