Forum Discussion
Bojan
Thank you for your feedback, but I have already tried that. I’m currently using a mapper snap (which maybe the wrong way to do it) used the data once, but there are after errors, because the 2 values are both null.
Is there a means of retaining the 2 values?
Jay
What should happen if the values are null? You can either filter those with a filter function:
$orderLine.filter(y=>y!=null)
or keep them as nulls with extending the expression with a ternary operator:
$orderLine.map(x=>x != null ? x.extend({"countryIso" : "GB","sessionId" : "ed7e8228-a82b-44e0-adea-caee6c61a987"}) : x)
- debra_paponette5 years agoNew Contributor
To this date nope. i have tried everything from create an SSL rest account and I am still getting the issue. The API works in postman and the browser but not the rest snap. I am out of ideas at this point
I was told to try something like this and it is working.
My rest API requires a query parameter.
http://ServiceURL?query=select * from table where id=1234
I had put in the URL into the Service URL box and then added a query parameter called query.
That did not work.
What does work is this:
‘https://ServiceURL /services/?query=’ + encodeURIComponent(‘select * from incidents where id < 1000’)
And that entire line went into the ServiceURL.
Seems that they do not fix the encoding in the query parameters.
Set the Service URL to “https://ServiceURL/services” and use the “Query parameters” table to set the query parameters. See the docs for this snap.
Related Content
- 7 months ago
- 2 years ago
- 5 months ago