- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 03:02 AM
I want to pass below job names as an Input request of PUT method of REST message which is in JSON format having “${env}” in the name of Jobs. It is observed after sending the request, “${env}” gets ignored and third party application database gets updated as RHDEM_****
Correct Job name : RH${env}DEM_****
Changed job name : RHDEM_****
Solved! Go to Solution.
- Labels:
-
IntegrationHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 12:08 AM
Got a reply from HI Team, this function is OOTB and can't be avoided. We can only replace the special characters by HTML encoding and it has to be decoded at client end.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 05:37 AM
Hi,
${variable_name} is used by ServiceNow to pass dynamic value. Since you are not passing value, servicenow might think it is blank. Add this line in your code before r.execute() and see whether issue is resolved
r.setStringParameterNoEscape('name', '${name}');
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 10:15 PM
Tried this - "name": "RM'${env}'USD_XXXX"
But this was not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 07:17 AM
Can you share the current code? I can check and confirm
Thank you,
Palani
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2022 10:33 PM
var PUTinput = {"name":"RH${env}DEM_XXXX","emailNotifications":[],"setVariableActions":[]}
NOTE = Request Body contains about 300 fields. For sample I have put 3. Below is PUT function called from the script include.
resData = this.jobDefinition3(PUTinput ));
jobDefinition3: function(getResponse) {
var r = new sn_ws.RESTMessageV2('XXXX.Release_Integration', 'PUT');
r.setRequestBody(getResponse);
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
return responseBody;
},