Hiding a variable on catalog item level

Kamva1
Tera Contributor

Greetings,

 

I have a requirement to hide a variable on catalog item (order guide really). I am trying to achieve this requirement through a UI Policy or alternatively through a Catalog UI Script. But for some reason the variable keeps on displaying on the catalog item view, I am not why and how this happening. See my configs below.

 

Client script configs:
Screenshot 2026-11-16 111224.png

 

UI Policy configs:

Screenshot 2026-11-16 112140.png

 

Result:

Screenshot 2026-11-16 111421.png

 

Please be advised that I am not implementing both at once, I tried both the above solutions but I am not getting the desired results.

 

Many thanks,

Kamva

6 REPLIES 6

PranjalSrvst
Tera Contributor

Hi @Kamva1 

 

To hide the variable, use:

g_form.setDisplay('variable_name', false);

and 

If the variable needs to be hidden conditionally:

function onLoad() {

if (/* condition */)

{ g_form.setDisplay('variable_name', false);

}

}

 

Maybe by mistake you've put setDisplay value to "true" instead of "false"

 

 

Aditya_hublikar
Giga Sage

Hello @Kamva1 ,

 you have to hide request type variable on catalog item level correct ? 

 

If yes then in your catalog client script you have to set display value to false in order to hide .

ex. g_form.setDisplay('request_type',false);

 

In catalog ui policy you have set attributes mandatory and visible as false to hide variable . Generally ui policy is used to hide field/variable based on certain conditions if you dont need that variable anymore without any condition then you can directly set it as active=false so it will get remove from form .

 

If this helps you then mark it as helpful and accept as solution .

Regards,

Aditya

Aditya_hublikar_0-1794831893543.png