
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a multiple choice variable that I have set as hidden but I still see if flicker / show temporarily at the top of my catalog item on the initial load. It's for debugging and I do not want the users to see it. I have some actions that will set it visible which work, but I want to stop it from initially flickering when the page loads. There is nothing that I have found that I am doing currently that would set it visible. I even have an onload script that has a setDisplay() to false. I would think setting the variable properties to hidden would be an overriding factor but it is not. Also there does not seem to be hidden property on the variable itself but I did find one I could set through the variable listing. Last, setting it to Inactive resolves this issue but I have no way to set it back to active through a change script.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Either use an onLoad Catalog Client Script, or the hidden checkbox on the variable definition (add to your form if it is not displayed), or a Catalog UI Policy. Try one at a time to see if there is a difference. I believe the script and UI Policy briefly display on load, I'm not sure about the checkbox. A workaround is to set the order last, so perhaps it's not as visible during that split second? You can also add the variable to a container / section, then load the form with the section collapsed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Oh yes I do see it there and set hidden to true and it did not help. Although other things I read suggested it would. I was wondering how I could see it when I open the properties of the multiple choice variable, thinking it would be better doing it there. The other suggestions make sense and will try them next if this doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @peterscaramuzzo ,
Please ensure that you utilize a Catalog Client Script with the g_form.setDisplay('variable_name', false) method. This approach ensures the variable remains hidden during the initial load and can later be made visible as needed. I
It's important to note that Catalog UI Policies may not effectively hide variables across different containers, such as Variable Sets and Catalog Item variables; therefore, Catalog Client Scripts are recommended for this purpose....
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Unfortunately, I had tried that previously (OnLoad Client Script) and it did not work.