- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 03:01 AM
Hi all,
I have a requirement on a Catalog Item to populate a field based on a prior selection. I have written a script but cannot get it to function, details below:
Variable name: 'server_to_enable' - this populates a list of configuration items.
Variable name: 'environment_to_enable' - we want this to populate with a list of environments that are associated with the earlier configuration items field. (this is the field that is not populating).
I've attached the script below, thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 03:21 AM
Hello Ankur,
Thanks for the script details. I tested this out but it did not work unfortunately. I believe the script includes method may be the way forward.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 04:05 AM
Hi Viraj,
I'm not familiar with alert statements, what's the format for these?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 04:11 AM
@GMoon
Syntax of alert statement
alert('Test onLoad!');
In your case after line 14 if you put alert statement as below you will get to know when your query is running what value is return and you can cross check if it required data you are fetching or not.
alert("Value"+vParent);
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 06:52 AM
Hi Viraj,
I added this to the script but when I test it I see a brief flash but no value shows up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 07:39 AM
@GMoon - Did you tried to add more alert statement at beginning of script which helps you to identify if your script is getting triggered or not. Also check what value you are getting at line 5 then in background script try to do GlideRecord step you are doing further by-passing value you got in line 5.
Also, you can try to open same table in list view and see what filter you put and are you getting expected result if yes try to build query using that encoded query.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.