Cat Client Script Support

GMoon
Kilo Sage

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.

1 ACCEPTED SOLUTION

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.

View solution in original post

13 REPLIES 13

Hi Viraj,

I'm not familiar with alert statements, what's the format for these?

Thanks

@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.

 

Hi Viraj,

I added this to the script but when I test it I see a brief flash but no value shows up.

@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.