- 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 01:31 AM
from g_form.getValue() I'm getting a value from a choice string field (the value can be '1' or '2' or '3' or '4')
I added ga.getXMLAnswer(getResponse); but I don't need to get a response. for example, if I simply put '1' in the addQuery, I get the result that I want (to filter the Assigned to list).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 01:25 AM
@Gal Katz Can you please log the sec and post the screen shot what you get in the log?
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 01:55 AM
I get undefined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2022 01:45 AM
@Gal Katz Please change the variable name from u_sec_class ro secClass in script include as below
var secClass = this.getParameter('u_sec_class');
Please try this. All your code looks good.
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 01:57 AM
Thanks but I got the same result.
by the way why should the variable name matter?