How to hide and show tab based on field value 'medium and 'high''

Nana5
Mega Guru

How to hide and show tab based on field value 'medium and 'high''

if risk field value high then need to show the Tab vice versa

8 REPLIES 8

Use the below code in an onChange() client script on the Risk field. Please modify the code as per your requirement.



  1. function onChange(control, oldValue, newValue, isLoading, isTemplate)  
  2. {  
  3.   if (isLoading || newValue == '') {  
  4.   return;  
  5.   }  
  6.  
  7.   var risk_value = g_form.getValue('risk'); //Replace risk with the coulumn name of the field  
  8.   if(risk_value == 'high')   //Replace high with the value of the high risk choice  
  9.   {  
  10.   g_form.setSectionDisplay('test', true); //Replace test with the section name you want to hide  
  11.   }  
  12.   else  
  13.   {  
  14.   g_form.setSectionDisplay('test', false);  
  15.   }  
  16. }

Hi Tanaji,


    Thanks for Reply.


Hi Prakash,



Please let me know if any issues.


If your query is answered please mark the responses correct/helpful and close this.



Thanks,


Tanaji