Skip to main content

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',DplaceId]);
var violationExists = violationInfoo0].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

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