Question on 'New' button on the 'Table' Form

cc11
Tera Contributor

Could somebody please help me figure how the 'New' button in the screenshot below was created & how its visibility is set?

I tried to look up 'Table' form's UI policies, Client Scripts, but I was unable to figure it out.

find_real_file.png

Fyi -

When I view my custom table, it shows the 'New' button.

However, when I view a table from a Global application — for example 'Embed Object' table , the button disappears.

Any help would be appreciated,

Regards,

Yogesh

1 ACCEPTED SOLUTION

antin_s
ServiceNow Employee
ServiceNow Employee

Hi Yogesh,



It comes from the OOB UI Macro -   'table_col_embedded_function'



Turn off the following property to false to hide the button.



ListProperties.setHasTopNavActionButtons(false);



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


View solution in original post

17 REPLIES 17

darius_koohmare
ServiceNow Employee
ServiceNow Employee

By default, the visibility of NEW UI Actions is tied to the presence of having access via a Create ACL.


In addition, you can right click a list and 'configure list layout' to 'Omit new button' on that list.


cc11
Tera Contributor

Thanks Darius,



I am specifically looking for the logic behind the 'New' button on the 'Table' form's Columns Tab.


It doesnt seem to be very straightforward to me.



Did you mean, right-click and configure list control? in order to toggle the visibility of the 'New' button?


It does work for me for any form/list that I have created.


But, for this list on the 'Table' form, I get the message below, when I do that.



find_real_file.png


antin_s
ServiceNow Employee
ServiceNow Employee

Hi Yogesh,



It comes from the OOB UI Macro -   'table_col_embedded_function'



Turn off the following property to false to hide the button.



ListProperties.setHasTopNavActionButtons(false);



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


cc11
Tera Contributor

Awesome! Thank you very much Antin!


The button's visibility changes when the Table is Global vs Custom.


Can you possibly help me know how that's being operated?



Thank you again,


Yogesh