- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 03:48 AM
you can write a script include and have this script there.
Call the script include from the client script and pass the string as a parameter to this script include.
Refer to following links
https://docs.servicenow.com/bundle/london-application-development/page/script/server-scripting/concept/c_ScriptIncludes.html
https://community.servicenow.com/community?id=community_question&sys_id=94a60365db1cdbc01dcaf3231f96192d
Kindly mark the comments as helpful and correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 04:02 AM
I think you did not understand my need.
The input string is comimg from an external application and that external application need to call the Servicenow REST api to search for knowledge based and then return the articles.
SO i guess the script you mentionned I need to build it outside service now like in for instance .NET test application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 04:09 AM
If it is coming from an external application, then the script that i give has to be written in the .NET application. In your .NET application, after you capture the string, you need to call the above script which will split the string and gives you the API url whic you can then call ServiceNow.
Kindly mark the comments as correct and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 05:05 AM
Or the API url is dynamically build in .NET and pass directly to servicenow I guess ?
NO need to make 2 loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2019 05:09 AM
Yes. the script which i give you will return you the dynamically API url based on the user inputted string. You use that and make a call.
Kindly mark the comment(s) as helpful and correct.