cancel
Showing results for 
Search instead for 
Did you mean: 

Work Zone UI Integration Cards - Object type, not binding to "content" from PerPersonal API

JBrook
Explorer
0 Kudos
583

We have a very basic sap.card type of Object that pulls data from our Successfactors PerPersonal API but will not bind to the "content". We see the data in the developer's tools in the json format so the data is being pulled but for the Object card type we can't get it to bind to the data field, {lastName} for example.

We can get the Table & List types to work with the same API but not the Object type?

Example:

{

"_version": "1.15.0",

"sap.app": {

"id": "ns.MyProfile_JB

"type": "card",

"title": "Jesse - My Employee",

"i18n": "i18n/i18n.properties",

"applicationVersion": {

"version": "1.0.0"

}

},

"sap.ui": {

"technology": "UI5",

"icons": {

"icon": "sap-icon://switch-classes"

}

},

"sap.card": {

"type": "Object",

"designtime": "dt/configuration",

"configuration": {

"destinations": {

"myDestination": {

"name": "SFdestination"

}

}

},

"data": {

"request": {

"url": "{{destinations.myDestination}}/odata/v2/PerPersonal",

"parameters": {

"$format": "json",

"$select": "personIdExternal,lastName",

"$top": 1

},

"withCredentials": true

},

"path": "/d/results"

},

"header": {

"icon": {

"src": "{photo}"

},

"title": "{personIdExternal}",

"subTitle": "{lastName}"

},

"content": {

"data": {

"path": "/d/results"

},

"groups": [{

"title": "Contact Details",

"items": [{

"label": "Last Name",

"value": "{lastName}"

}]

}]

}

}

}

View Entire Topic
nathanhand1
Explorer
0 Kudos

/d/results is an array, you're trying to map a single object to an array.

If you changed the "content" data path to "/d/results/0" you should see the lastName property be filled in.

JBrook
Explorer
0 Kudos

Yes, that makes sense and it worked. Thanks!