on ‎2023 Jan 02 2:14 PM
Hi,
I am trying to extract information from a SAP destination.
The response from my API call looks like this:
(This is the response that shows when using the "Test" tab)
{ "value": [ { "id": "j9f7qe50-r5bb-45cj-7cd4-386c34658pa5", "projectId": "5c6fhe73-epa1-i9c6-9b0j-649fd9hec53t", "name": "AAAAA", "description": null }, { "id": "4ad51t1b-3cy4-4b40-a6cr-r4hbdb017cc1", "projectId": "5c6fhe73-epa1-i9c6-9b0j-649fd9hec53t", "name": "Test 1", "description": "test created with new app" }]}
I used the auto detect schema from response which gave me a set of variables as follows:

Now when trying to use this data in a text for example Appgyver tells me to use the following formula:
"data["CalmAPI-Scopes1"][0].value[0].name"
Which should seem logical to get out the first name of the Data I just extracted.
But when the application is launched no information shows up in the text section where the name should be.
I was wondering if maybe I am using the wrong formula to extract the "name" variable and if there is another way to do it.
After doing some research I realise that using the "Response Mapper" option could help with the extractionof this data, but I cannot seem to find any documentation explaining how to use this Response Mapper.Does that documentation exist and if it does would it be possible to get a link to it?
And with the Response Mapper is there anyway to get only the information like follows:
{ "id": "j9f7qe50-r5bb-45cj-7cd4-386c34658pa5", "projectId": "5c6fhe73-epa1-i9c6-9b0j-649fd9hec53t", "name": "AAAAA", "description": null }, { "id": "4ad51t1b-3cy4-4b40-a6cr-r4hbdb017cc1", "projectId": "5c6fhe73-epa1-i9c6-9b0j-649fd9hec53t", "name": "Test 1", "description": "test created with new app" }}
And getting rid of the "value:" I think this would help with the clarity of the data and its usage.
I don't this the issue comes from data not existing as when I run the test I get the Json response that was shown above.
Request clarification before answering.
You can use a similar functionality in the REST calls with BTP destination. You need to set the mapper to something like this:
{ records: response.data.team_all_season.queryResults.row, driverCode: response.status }
where "team_all_season.queryResults.row" provides the path to the list. You can see the schema to the MLB API I used here: https://appac.github.io/mlb-data-api-docs/#team-data-list-teams-get
I would imagine in your case it would be something like this:
{ records: response.data.value[0], driverCode: response.status }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.