getSitesListsItemsFields - Odata SharePoint Online

I am trying to figure out how to get sharepoint online lists items field property via Radzen.

Using page events to invoke data source method with getSitesListsItemsFields and providing 3 properties id, listId and listitemId and then I set properties to ${result} but I do not get anything in datagrid.

Is there something I am missing? I confirmed with ms graph and I can use graph with above provided id, listid and listitemid.

https://graph.microsoft.com/v1.0/sites/mysite.sharepoint.com,mylongidremovedforprivacy/lists/Users/items/5

Inside there I have multiple fields which I am trying to grab its name and value. I am new at this so maybe i am missing something.

Check your browser's developer tools to see what HTTP request is made and what the response is.

This it the url request which i can see google dev tools and I confirmed with graph that is shows results.

https://graph.microsoft.com/v1.0/sites('mysite.sharepoint.com,mylongidstring')/lists('Users')/items('5')/fields

Below error from google dev tools. 5 is listitemid.

TableBody.html:61 ERROR Error: Cannot find a differ supporting object '5' of type 'string'. NgFor only supports binding to Iterables such as Arrays.
at NgForOf.push.../../../Program Files/Radzen/resources/node_modules/@angular/common/fesm5/common.js.NgForOf.ngDoCheck (common.js:3368)
at checkAndUpdateDirectiveInline (core.js:22102)
at checkAndUpdateNodeInline (core.js:23363)
at checkAndUpdateNode (core.js:23325)
at debugCheckAndUpdateNode (core.js:23959)
at debugCheckDirectivesFn (core.js:23919)
at Object.eval [as updateDirectives] (TableBody.html:2)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:23911)
at checkAndUpdateView (core.js:23307)
at callViewAction (core.js:23548)

It seems the DataGrid tries to data-bind to something which isn't an array of items. How does the response look like? Also can you show a screenshot of your DataGrid configuration?

I think you are right I can't figure out the Datagrid for this lookup. I can see in my response that fields file does populate with correct details.

@odata.context: "https://graph.microsoft.com/v1.0/$metadata#sites('mysite.sharepoint.com,longid')/lists('Users')/items('1')/fields/$entity"
@odata.etag: ""cxxxxxxa8,1""
AppAuthorLookupId: "3"
AppEditorLookupId: "3"
Attachments: false
AuthorLookupId: "108741822"
ContentType: "Agent"
Created: "2019-10-31T15:53:47Z"
CustomHoursEnable: false
Edit: ""
EditorLookupId: "13741822"
FolderChildCount: "0"
ItemChildCount: "0"
Modified: "2019-10-31T18:53:47Z"
id: "1"
usr_mal_email: "test.test@test.com"
usr_iss_active: true
usr_iss_order: 1
_ComplianceFlags: ""
_ComplianceTag: ""
_ComplianceTagUserId: ""
_ComplianceTagWrittenTime: ""
_UIVersionString: "1.0"

I am trying to set the property to ${result} then from DataGrid I am selecting page property. However that does not auto populate columns and I tried using the above fields name as column property but I couldn't get it.

This seems to be a single instance. The DataGrid needs an array of items though. One way to do it is to set the page property to [${result}] (creating an array with one item - the result).

Sweet that worked. Just a follow up if you can guide me. I get my items values via GetSitesListsItems and then want to expand on its Fields via GetSitesListsItemsFields how can I dynamically pass the value of each Items?

I have done the following but I think value is not passing through:-

Page Load
-invoke getSitesListsItems (id, listid)
--Name=ids and value set to ${result.value}

Above gets me the item ids and then I try to pass it to getSitesListsItemsFields

-invoke getSitesListsItemsFields(id, listid, and here I put in ${ids.id})
-Assign result of Fields as array as you mentioned above since its a single item. [${result}]. However, the fields is giving this error. message: "Cannot find resource for the request undefined."

I think I was using the wrong way on getting the items and its field. Pretty new to Radzen so still exploring. I manage to get my results via $expand option with fields as value on Invoke Data Source method with getSitesListsItems. This provides me array of fields within items and I call them via column fields.myfieldname.