Show/Hide UI Macro on the incident form

sri1994
Tera Contributor

Hi,

My requirement is to have a button beside one string field on incident form, when i click on the button it should take the content from that string field and paste it in comments and update the incident...

 

I have created a UI macro for that and placed that button beside to the form

find_real_file.png

And here is how it looks

find_real_file.png

 

So here what i want to achieve is, i want to display Update button only when checkbox is checked, so i want to show/hide the UI macro button based on the check box..

Can anyone help me how to achieve this with  code??

 

 

Thanks,

Srikanth

 

 

3 REPLIES 3

Harsh Vardhan
Giga Patron

adding one thread here which had quite similar requirement. kindly have a look. 

 

https://community.servicenow.com/community?id=community_question&sys_id=91925401dbad1f80032a7a9e0f96...

viet2
Kilo Contributor

Hi Srikanth,

This one is working for me.

first, replace id="testingbutton" by name="testingbutton" 

then use:    g_form.getElement('test123').style.visibility="hidden";

 

How do you attach the "update" button/macro at the end of the string field? I need help with this one.

 

Thanks

You could use the Field decorations dictionary attribute.

In the field's dictionary editor add:

field_decorations=<name of your UI Macro>