want to set the variable only visible to one catalog

Community Alums
Not applicable

Hi All, 

 

Having a requirement that need to set one variable of a variable set need to make it visible for only one catalog 

and need to make it not visible to other catalogs. 

 

Need suggestions. 

 

tried the below script, 

function onLoad(){

var itemSysId = g_form.getUniqueValue(); // give item sys_id for which variable should be available on form

if(itemSysId != 'your item sysId here'){

g_form.setDisplay('alternate_approver_check',false);

}

}

 but its not working. any suggestion to make it achieve.

2 REPLIES 2

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Community Alums 

Greetings!

Can you cross verify the sys id, variable name and check. The above code should work.

Pls provide the screenshot of your script.

Please Mark the Answer as correct solution and helpful if helped!

 

Kind Regards,

Ravi Chandra.

Community Alums
Not applicable

Hi @Ravi Chandra_K 

 

As suggested made the script modification as below

function onLoad() {
//Type appropriate comment here, and begin script below
var itemSysId = g_form.getUniqueValue('a3312b3fdb7c741019ded3ca4b961904'); // give item sys_id for which variable should be available on form

if (itemSysId != a3312b3fdb7c741019ded3ca4b961904) {

g_form.setDisplayValue('title', false);

 

still its not working.  Can you suggest any chnages required on the above script. ?