- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 11:51 PM
Hello,
This is a part of my JSON message which accepts array input
{
"value": {"array": { "elements": [
{"number": {"value": 80}},
{"number": { "value": 100 }}
]}
},
"type": "Array/number",
"name": "cdmAddDisk",
"scope": "local"
}
The value I have to pass here comes from a Request Item multi line text separated by commas.
But it does not accept it. Any idea?
Thanks,
Vinitha.K
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 03:00 AM
I got it by setting r.setStringParameterNoEscape();
r.setStringParameterNoEscape("cdmAddDisk",global.JSON.stringify(str.split(',')).replace(']',',]').replace(/\"/g,"{\"number\": {\"value\":").replace(/{\"number\": {\"value\":,/g,"}},").replace(',]',']'));
Thank you so much for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 02:49 AM
Can you let me know how to get the JSON message from this script?
Thank You,
Vinithabanu Kaliamurthi| Senior Application Software Developer | CDM Smith | Tel: (617) 452-7705 | e-mail: vinithabanuk@cdmsmith.com<mailto:vinithabanuk@cdmsmith.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 02:54 AM
Pls share your REST POST content defined in you outbound REST configuration...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 02:56 AM
{"parameters":
[
{
"value": {"array": { "elements": [
{"number": {"value": 80}},
{"number": { "value": 100 }}
]}
},
"type": "Array/number",
"name": "cdmAddDisk",
"scope": "local"
}
,
{
"value": {"string":{ "value": "4:00AM"}},
"type": "string",
"name": "cdmPowerStartTime",
"scope": "local"
}
,
{
"value": {"string":{ "value": "6:00PM"}},
"type": "string",
"name": "cdmPowerStopTime",
"scope": "local"
}
,
{
"value": {"string":{ "value": "No"}},
"type": "string",
"name": "cdmPowerWeekends",
"scope": "local"
}
]}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 03:00 AM
I got it by setting r.setStringParameterNoEscape();
r.setStringParameterNoEscape("cdmAddDisk",global.JSON.stringify(str.split(',')).replace(']',',]').replace(/\"/g,"{\"number\": {\"value\":").replace(/{\"number\": {\"value\":,/g,"}},").replace(',]',']'));
Thank you so much for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 03:10 AM
Good - Pls mark this as answered so that it will help others also...