Skip to main content
Solved

FSM WebClient - Is it possible to control the visibility of a field based on the tab shown?


ZRZJOLIVEIRA
Do Gooder (Partner)
Forum|alt.badge.img+7

Hi all,

 

We have a requirement from our client where we need to control fields visibility based on Request Type. Using client script we can easily do this, our problem is that some fields appear on two different tabs (for the same request type it should be visible on TAB A but not on TAB B). 

 

Do you know if it is possible to control the visibility on a specific tab? Or if there is any event we can use to trigger the script (we tried the GotFocus event, but nothing happened)? We also tried to use the name to register property of the field at UI Designer, but it seems the setcontrolvisibility function only accepts the “real” DB field name on the DB…

 

Thanks in advance,

João Oliveira

Best answer by nickz

a workaround suggestion…. copy the field into a user_def, then make the user_def visible or not instead?

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

5 replies

Forum|alt.badge.img+6
  • Do Gooder (Employee)
  • 30 replies
  • April 27, 2021

Hi @ZRZJOLIVEIRA 

This is script to hide the Contact tab on a screen.

You can use this as basis to understand the logic and adjust it with your parameter.

var screenName=getCurrentScreenName();
var viewID='';
if(screenName=='OPPORTUNITY')
    viewID='oppty_contact';
else if(screenName=='PLACE' || screenName=='REPAIRPORTALPLACE' || screenName=='TECHPORTALPLACE')
    viewID='place_contact';
else if(screenName=='PRODUCT' || screenName=='DEALERPORTALPRODUCT' || screenName=='REPAIRPORTALPRODUCT' || screenName=='TECHPORTALPRODUCT')
    viewID='product_contact';
else if(screenName=='QUOTE' ||
    screenName=='WFDEMOPPTYQUOTE' ||
    screenName=='WFDEMOQUOTECONTRACT' ||
    screenName=='WFDEMOQUOTENONPART' ||
    screenName=='WFDEMOQUOTEPART' ||
    screenName=='WFQUOTE' ||
    screenName=='WFQUOTECONTRACT' ||
    screenName=='WFQUOTENONPART' ||
    screenName=='WFQUOTENONPARTREQUEST' ||
    screenName=='WFQUOTENONPARTRMA' ||
    screenName=='WFQUOTEPART' ||
    screenName=='WFQUOTEPARTREQUEST' ||
    screenName=='WFQUOTEPARTRMA')
    viewID='quote_contact';
else if(screenName=='REQUEST' || screenName=='TECHPORTALREQUEST' || screenName=='WARRANTYCLAIMS' || screenName=='DEALERPORTALWARRANTYCLAIMS')
    viewID='request_contact';
setControlVisibility(viewID,'import_contact',false);
setControlVisibility(viewID,'export_contact',false);

Best regards,

Sven

 


Forum|alt.badge.img+6
  • Do Gooder (Employee)
  • 30 replies
  • April 27, 2021

@ZRZJOLIVEIRA 

In the case the view ID is missing, you need to create a new one in the UI designer. 

Please note, this is not related to the name to register. 

Best regards,

Sven


ZRZJOLIVEIRA
Do Gooder (Partner)
Forum|alt.badge.img+7
  • Author
  • Do Gooder (Partner)
  • 23 replies
  • April 27, 2021

Hi,

 

Thank you very much for your comments, but we are trying to hide one field on a specific tab (not the tab itself).

 

Best regards,

João Oliveira


Forum|alt.badge.img+19
  • Superhero (Employee)
  • 187 replies
  • Answer
  • April 29, 2021

a workaround suggestion…. copy the field into a user_def, then make the user_def visible or not instead?


ZRZJOLIVEIRA
Do Gooder (Partner)
Forum|alt.badge.img+7
  • Author
  • Do Gooder (Partner)
  • 23 replies
  • April 29, 2021

Hi nickz,

 

Thank you for the suggestion...it’s not perfect (another field on the data model, new BR to copy the value from one field to another., etc) but it works.

 

Best regards,,

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings