SAP Builders Discussions
Join the discussion -- ask questions and discuss how you and fellow SAP Builders are using SAP Build, SAP Build Apps, SAP Build Process Automation, and SAP Build Work Zone.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cant set Scema from GET record

Ben_Samuel
Explorer
0 Kudos

Hi 

i managed to connect AppGyver (community version) to our C4C backend and got the REST API to work for single record, see the image attached.

Ben_Samuel_0-1709874826480.pngBen_Samuel_1-1709874859831.png

Ben_Samuel_2-1709874907431.png

this schema is incompetible when i tried binding a single text to any field of this data source.

when i put the response key path as per below - got error '

Error: The server responded with a list for a single data record. The response must be an object.status: -1 

Ben_Samuel_3-1709875014957.png

Ben_Samuel_4-1709875064493.png

pls help - there has been many questions raised on the same and no answer so far for years.

 

 

 

2 REPLIES 2

mihaly-toth-nc
Explorer

Dear Ben, 

The response that you show in the 2nd image is SINGLE object with the schema:

{
  results: [
    { object }
  ]
}

This is an object, but then in the 3rd image you set the path to the response as 'd.results', which in your case is a LIST. A LIST type is not a SINGLE record. Hence you cannot set the schema. 
There are two solutions for this:
1. you either omit the 'response key path' setting and then you'll get an object with the full schema that you have. 

2. You configure the exact same call but under the 'Get record collection' tab in the left side menu. In this scenario please also use the 'response key path' the same way as you have already done in image 3. 

Wishing you the best in developing your application. 

No-code expert with extensive experience in SAP Build Apps (former Appgyver), Firebase, Xano. Actively working on a startup and further projects.

0 Kudos

Hi Mihaly

thanks for quick response, I got all to work as expected now.

regards