I am going to migrate data from one system to another using the iterate web request through Easymorph. When I send a POST request for a row in the table (elements in json matching some, but not all of my columns), I receive a response from the webrequest with the new id for the new table for that row. I however lose the info from the columns that are not included in the web request, since the action deletes the original colums. Is there a work around for this or am I doing someting wrong.
TXS for some help, got stuck
If the order of responses is the same as the order of requests, then you can simply use the “Append table” action in the “Append columns” mode to append the source dataset (before “Iterate web request”) and the resulting dataset (after “Iterate web request”) side-by-side.
Alternatively, try to use some column value as a key, and the merge back the result using the key.
Finally, notice that the “Iterate/Web request” action allows adding request columns to the result:
Therefore you can add the old ID as a dummy request header (e.g. “X-Old-Id”) and it will be preserved as a column among the response columns in the result of the action.
OK, Dmitri, going to give that a try, TXS for the quick response. I would assume the order is the same, but I’m not sure, I will test it.
The append works. For the second option (which has my preference), with the settings like in the screenshot and the exact same header name, this is not returned from the webservice. Maybe it’s a webservice setup to not return all header info ?
It seems like an issue on our end. We’ll look into it.
The label is wrong, it should not mention headers, so it was my mistake to suggest you using it. We’ll remove the mention of headers from it shortly.
So two options remain: use “Append table” to append columns, and merge.
One more option - add the request body and extract the old ID from request body using the jsonvalue() or xmlvalue() functions.