Question

how to hide following tab group using setTabGroupVisibility function

  • 13 July 2023
  • 1 reply
  • 41 views

Userlevel 2
Badge +9

Hi Experts,

 

There is a requirement to hide Violation* tab group if the violation exists is equal to 3

following is the screen
 


and following is the xml of ui designer where it contains view_id
 


i have done the client script as following​​​​​​​

 

var placeId = getControlValue("c_sec_place_d5_inspection_eform_data","place_id");
var violationInfo = getDBValues('C_GET_Q0003',[placeId]);
var violationExists = violationInfo[0].q0003;

alert(violationExists);

if (violationExists == 3)  
{
   // hide viloation group
   setTabGroupVisibility('violation', false); 
   alert('hide');
}

but I’m not sure whether to use setTabGroupVisibility or setTabItemVisibility
have tried both and it does not hide the panel of violation

Could you please help me with this

​​​​​​​Thanks in advance


1 reply

Userlevel 4
Badge +12

Hi @Heshala 

It should work with the setTabItemVisibility function since you have a tab item and a correct view id. Also make sure that the tab item has the correct view id under the properties section instead of checking on the xml level. If none of these work, is there a possibility to have this violation tab as a separate tab item instead of grouping it? This definitely works with setTabItemVisibility function if you have the ui setup for this separately even though I’m not quite sure about the setTabGroupVisibility.

Reply