When sending parameters to a web server, how do you include piped text from an embedded data object? | XM Community
Question

When sending parameters to a web server, how do you include piped text from an embedded data object?

  • 22 January 2019
  • 9 replies
  • 5 views

Whenever I try to do this (my embedded data is, in this case, a JSON string), I get an error like `Unparsable argument: ${e://Field/jsonObj}`.

9 replies

Hello @JoshuaLandman ,

We use it as shown below
`key : "${e://Field/jsonObj}"`
Hi @Shashi,

Thanks for your tip! I tried that, and instead of the previous error I mentioned, I got this one instead: `lexical error: invalid char in json text. ${e://Field/jsonObj} (right here) ------^`

Do you have any tips for getting past this one?
> @JoshuaLandman said:
> Hi @Shashi,
>
> Thanks for your tip! I tried that, and instead of the previous error I mentioned, I got this one instead: `lexical error: invalid char in json text. ${e://Field/jsonObj} (right here) ------^`
>
> Do you have any tips for getting past this one?

Can you please send the screen shot of web service element OR if you are using postman or some other application please send the json objects
!
> @JoshuaLandman said:
> !
>

May I know the api you are using?
On the client side, I'm using the standard Qualtrics web interface.

It's a custom, unreleased API on the server end. I'm not able to speak about it more at this point. I tested that string locally using that API and it works with the endpoint I'm sending my POST request to.
> @JoshuaLandman said:
> On the client side, I'm using the standard Qualtrics web interface.
>
> It's a custom, unreleased API on the server end. I'm not able to speak about it more at this point. I tested that string locally using that API and it works with the endpoint I'm sending my POST request to.

Try removing the quotes around the piped text and change JSON to String in the jsonObj row
I still get this error: `lexical error: invalid char in json text. ${e://Field/catObj} (right here) ------^`
Userlevel 6
Badge +28

I use string as a type for any embedded values to be passed and it works.
Can you mention what kind of data does your embedded variable hold which needs to be passed?

Leave a Reply