- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 12:41 AM
In Script-Include: I'm getting a parameter from Client-Script (I used g_form.getValue() on a String Choice Field to get the value and send it to Script Include).
I need to insert a string to the query but for some reason I can't convert the parameter to string (in addition to what is shown in the image below, I tried: sec = u_sec_class.toString() without success)
Please advise.
 
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2022 12:05 AM
I'm updating that I instead of using the parameter I wrote a workaround and just used current.u_sec_class in the query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 02:10 AM
@Gal Katz For me code looked ok but you were getting the issues right so I wanted to check with that.
This means this.getParameter() function itself is returning undefined value
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 02:12 AM
@Gal Katz I hope the script include is client callable.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 03:20 AM
yes it is client callable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 03:33 AM
@Gal Katz I think you missed calling the getXML() function in client script.
ga.getXML();
Please add that and check once.
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 03:57 AM
I didn't forget it, it's not there on purpose.
the action is happening in the Script Include and if I just put a string in the query instead of this variable its all working well.