Skip to main content

Hi,

I am trying to hide button based on request type from below client script ,I have given event type as selectionchanged. It is working for smart client not for web client. please suggest how to reflect same for web client.

 

var REQTYPE = getControlValue('REQUEST','REQ_TYPE');

if (REQTYPE == 'BASIC' ||
    REQTYPE== 'FIX')
{
      setControlVisibility("addNote", false);
      
}
else
{
    setControlVisibility("addNote", true);
}
return false;

 

Regards,

Ramya

Hi @RamyaR ,

Create a client script with the below values. 

 

Client Script - Web Client Only

Client Script code - 


var REQTYPE = getControlValue("request","req_type");

if (REQTYPE == 'BASIC' ||
    REQTYPE== 'FIX')
{
      setControlVisibility("addNote", false);
      
}
else
{    
    setControlVisibility("addNote", true);
}
return false;

Make sure to attach the client script with the request_type in the UI Designer for AfterValueChanged event.

UI Designer - Customized screen

 

Save the new screen and make sure to refresh the cache in the web client. Following are the output seen in the web client when the request type is changed. 

 

Request Type = ‘Basic’, “New” button has been hidden.


 

Request Type = ‘Return’, “New” button is visible.



Hope the above answer helps to achieve your requirement. 

Best Regards,
Atheeq


@Atheeq Maharoof thanks for the detailed explanation, I followed same steps but It’s not working in web client. If I do same for smart client it is working, Not sure what I am missing. I am using FSM 6.8 version.

 

Regards,

Ramya

 

 


Hi @RamyaR,

I just wanted to provide you some points to check why its not working. I am using FSM6UPD9

Upper case values

When changed the script as above where getControlValues contains “REQUEST” and “REQ_TYPE”, it did not work for me as well. Using lower case values solved this issue. 

 

Lower case values

  Please make sure to select the client type as “Web Client Only”.


Hope the above answer helps to solve your issue.

Best Regards,
Atheeq


Reply