Skip to main content

Hi,

 

Using client script I want to hide a sub tab button.

Suppose if you open Request screen, under that we have a sub tab named attachment. So I want to hide the attachment’s New button using client script.

So I am using this function “ SetControlVisibility(‘request_attachment’,’add’,False); “

But it’s not working in smart client. Can anyone suggest me where am I wrong or how we can hide this using client script. 

 

Thanks,

Kaustav

Hi Kaustav,

I am not sure how to do this with script as I have always seen this sort of change done using the UI Designer. In UI Designer you can select the screen you want and then click the tab you want to hide. This will then show the information for this tab on the left hand side and one of the settings will be a tick box for ‘invisible’.

You can tick this and then save the design under a new name. If you only want to apply this for certain users you can then do this using the Roles within FSM to set different designs to show for different roles.

Hope this helps.

Kind regards,

Lee Pinchbeck


In the Web Client, you use the name of the button - not the ‘registered name’ as the first argument to setControlVisbilitity().  In the Smart Client, you use the ‘registered name’ for the button.  The Web Client will not show a screen item that is defined invisible = Y even if you call setControlVisibility(“item_name”, true);.

So, if you need to support both Web and Smart client, you write a ‘Web Client only’ Client Script (the Smart Client will execute these even though they say web client only) tied to whatever event, and call setControlVisibility() twice.  The call referencing the ‘other’ platform’s required value doesn’t produce an error so this works.  Here is what you need in your Client Script - but change the names to the actual names of the item you have:

setControlVisibility(“button_name”, false);  //for Web Client
setControlVisibility(“registered_name”, false);  //for Smart Client


Reply