Solved

Button Visibility

  • 9 September 2021
  • 1 reply
  • 120 views

Userlevel 3
Badge +3

Hi,

Is there any way we can create set control visibility function based on search menu drop down value. Suppose task type in search menu selected as break fix based on that value button should visible, Please suggest.

 

Regards,

Ramya

icon

Best answer by Atheeq Maharoof 10 September 2021, 10:32

View original

1 reply

Userlevel 5
Badge +12

Hi @RamyaR ,

Following are the steps to achieve your requirement in the webclient. I have tried it in the request screen. 
1. Create the following script (I have added a new button called “testAdd” in the request screen under search section) 

Client Script

Script - 
var REQTYPE = getControlValue('request','req_type');
if (REQTYPE == 'BASIC' ||
    REQTYPE== 'FIX')
{
      setControlVisibility("testAdd", false);
      
}
else
{    
    setControlVisibility("testAdd", true);
}
return false;

2.  Navigate to the request screen in UI designer and click View Screen Events icon in the toolbar. Add the created script as a AfterDataLoad event under the search events. 

UI Designer request screen
  1. Test it in the Web Client
Button Visible Scenario
Button Hidden Scenario


Hope this answer helps.

Best Regards,
Atheeq​​​​​​​

Reply