- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2022 11:30 PM
Hi All,
What is the use & difference between setStringParameter & setQueryParameter ?
Please help with some use case if any..
Thanks is advance...
Solved! Go to Solution.
- Labels:
-
Integrations
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2022 11:46 PM
Hello,
setQueryParameter -
Appends a parameter to the end of the request URL with the form name=value.
For example, the code setQueryParameter("sysparm_query","active=true^ORDERBYnumber^ORDERBYDESCcategory"); appends the text sysparm_query=active=true^ORDERBYnumber^ORDERBYDESCcategory to the request URL.
refer - Doc
setStringParameter -
Sets a REST message function variable with the specified name from the REST message record to the specified value.
XML reserved characters in the value are converted to the equivalent escaped characters. To set simple string values such as sys_created_by which won't have special characters
Example,
var sm = new sn_ws.RESTMessageV2("<REST_message_record>","get");
sm.setStringParameter("s","NOW");
refer - Doc
Thanks & Regards,
Akshay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2022 11:45 PM
Hi
Please go through the RESTMessageV2 API documentation given on the Developer site.
setStringParameter(String name, String value)
XML reserved characters in the value are converted to the equivalent escaped characters. Use setStringParameterNoEscape to set a variable without escaping XML reserved characters.
setQueryParameter(String name, String value)
For example, the code setQueryParameter("sysparm_query","active=true^ORDERBYnumber^ORDERBYDESCcategory"); appends the text sysparm_query=active=true^ORDERBYnumber^ORDERBYDESCcategory to the request URL.
Please mark my answer as correct if this solves your issues!
If it helped you in any way then please mark helpful!
Thanks and regards,
Kartik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2022 11:46 PM
Hello,
setQueryParameter -
Appends a parameter to the end of the request URL with the form name=value.
For example, the code setQueryParameter("sysparm_query","active=true^ORDERBYnumber^ORDERBYDESCcategory"); appends the text sysparm_query=active=true^ORDERBYnumber^ORDERBYDESCcategory to the request URL.
refer - Doc
setStringParameter -
Sets a REST message function variable with the specified name from the REST message record to the specified value.
XML reserved characters in the value are converted to the equivalent escaped characters. To set simple string values such as sys_created_by which won't have special characters
Example,
var sm = new sn_ws.RESTMessageV2("<REST_message_record>","get");
sm.setStringParameter("s","NOW");
refer - Doc
Thanks & Regards,
Akshay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2022 11:58 PM
Hi Ratan,
setStringParameter() will set the variable that can be replaced by a script. Variables can be used anywhere in the uri.
e.g. "id" is a variable.
http://myserver.mycompany.com/offices/${id}
setQueryParameter() will set the parameter. In Scripted REST API, Query Parameter needs to be set. Parameters are in form of "<parameter name>=<value>" and is appended to the uri.
e.g. "filename=image.jpg" is a parameter
http://myserver.mycompany.com/offices/filename=image.jpg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2023 12:44 AM
I have some questions about Uk49s Lunchtime Lottery. I am telling this question in this thread. These questions are given below:
1. What is the most common winning numbers?
2. How to participate in Uk49s lunchtime Lottery?
3. Is It Legit to play or not?
If someone has information has Uk49s Lottery tell me below. I am very confused.