Web API: Unable to send Parameters.

#1
Hi All,

By using POST method I am performing a task, below is it's body content:

{
"taskNumber":"SCTASkXXXXX",
"taskState":"Closed Complete",
"workNotes":"User Added.",
"comments":"",
"closeNotes":"Task closure done."
}

Now issue is, value of taskNumber needs to be changed in every iteration, so I need to pass taskNumber as a variable so that it's value keeps on changing.
Currently it's value is hardcoded and we don't want that.
How can we achieve that in Blue Prism?

Any help would be appreciated!!

Regards
Dinesh
 
#2
There can be various ways to do this:

One way is to store the skeleton of BODY in a data item, lets call it [Body]. See below:
{
"taskNumber":"PLACEHOLDER",
"taskState":"Closed Complete",
"workNotes":"User Added.",
"comments":"",
"closeNotes":"Task closure done."
}

Create another data item, lets call it [TaskNo] which will store those values like SCTASkXXXXX , SCTASYYYYYY, SCTASkZZZZZZ

Finally,
Use a calculation stage to replace PLACEHOLDER in [Body] with [TaskNo].
Function : Replace([Body],"PLACEHOLDER",[TaskNo])
 
Top