want to set the variable only visible to one catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2023 03:46 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2023 07:27 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:58 AM
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. ?