How Can I check variable's visibility?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 06:23 PM
I want to check variable's visibility on catalog item script.
I tried g_form.isVisible() function, but it didn't worked because of below error.
"ge.getElementParentNode is not a function"
Anyone meet with same situation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 07:09 PM
Hi, you may need to provide some additional details about exactly what you are trying to do.
Are you trying to programmatically check if a variable field is visible to end users?
I am not sure if there is a method g_form.isVisible()
but g_form.setVisible() would show or hide a form field in the UI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 10:16 PM
>Are you trying to programmatically check if a variable field is visible to end users?
Yes. Purpose is only check if a variable field is visible in client catalog script.
(Why need that and how I use result of check is very complexly. So I omit that.)
Do you know any way to check that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 10:21 PM
You cannot determine if variable is visible or not using script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 08:11 PM
you want to use variables in scripts ? please provide more information.