web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DataTable is showing [...
Power Apps
Unanswered

DataTable is showing [object Object] in column for data from sharepoint

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have created small App that pulls data from sharepoint list.

 

Form has Datatable and Formviewer to display rows selected in data table. Connection between Data table and form viewer has no issue. In data table i am showing 2 columns that are "Single Line of Text" in sharepoint.

 

I am planning to include Modified person name in view to identify who last updated this record rather than clicking on each rows and viewing in formviewer. Issue is when i include column which is "Person or Group" in sharepoint I see value [object Object] appearing in my App created with Powerapps. I tried running through properties and advance properties and even tried searching solution on internet but i failed to find solution.

 

Please guide me on how to fix this issue.

 

Thanks

Categories:
I have the same question (0)
  • RusselThomas Profile Picture
    4,014 on at
    Re: DataTable is showing [object Object] in column for data from sharepoint

    Hi priyankbhat,

     

    I know it used to be the case that DataTables could not render complex (or nested) objects at all.

    I do believe this was updated in a later release however and, for Modified By and Created By at least, it seems to render the DisplayName property without any manipulation;

     

    complexGrid.PNG

     

    Do you perhaps have some more details you can share to help reproduce the problem on this side?

     

    Kind regards,

     

    RT

  • Community Power Platform Member Profile Picture
    on at
    Re: DataTable is showing [object Object] in column for data from sharepoint

    Hi RT,

     

    Find below screen short of error that is appearing.

     

     

    Capture.JPG

     

    REDStatus is collection that has been created from existing sharepoint view. Below is code.

     

    Refresh('Status Report');
    ClearCollect(REDStatus, Filter('Status Report', RAG_x0020_Status.Value = "RED"))

    Below screenshot is from original sharepoint list.

    Capture2.JPG

     

    Thanks

    Priyank

     

  • RusselThomas Profile Picture
    4,014 on at
    Re: DataTable is showing [object Object] in column for data from sharepoint

    Thanks Priyank,

     

     

     

    It seems to work the same for me whether using the source direct or using a collection from the source.  Below is the collection;

     

    complexGrid2.PNG

     

    So, I'm a bit stumped to be honest. 

    I do notice however that your column names in your collection are different from the source, but changing the display names on my side don't affect the outcome. 

     

    Are you using the web studio or the desktop studio?

     

     

    Kind regards,


    Russel

  • Community Power Platform Member Profile Picture
    on at
    Re: DataTable is showing [object Object] in column for data from sharepoint

    Hi Russel,

     

    I am using web studio.

     

    Here is steps i done before i identified issue.

    1) Add DataTable to screen and gave datasource to existing sharepoint table.

    2) I am able to select column. 

    3) Next thing i did was created collection using script i shared earlier and filtered data.

    4) Manually in advance property window replaced sharepoint view with collection.

    5) I am still able to see data in collection. Even any new data getting added to collection is correctly displaying.

     

    Now issues occures if i do below

    1) Goto property window and select additional Fields.

    2) Additional text field is correctly getting displayed

    3) Issue appears when i select any fields which has choices or "People and Group" datatype.

     

    Temporarily i identified workaround

    1) Goto property window and select original sharepoint table.

    2) Select new columns which are choices or "People and Group" data type

    3) Fields start displaying correct data 

    4) Go back again to advance property and manually replace sharepoint table with collection.

     

    This is workaround. Is there way when i see data as [object Object] I can manually map/make configuration to resolve issue ?

     

    Thanks

     

    Priyank Bhat

  • Verified answer
    RusselThomas Profile Picture
    4,014 on at
    Re: DataTable is showing [object Object] in column for data from sharepoint

    Hi Priyank,

     

    It does seem to be a bit temperamental - sometimes it renders CreatedBy, sometimes it renders Author - and then you get [object Object] values.  Pretty weird, not sure why it does this, I'm sure someone more knowledgable than me could explain 🙂

     

    To work around it however, you can add a column when you create the collection and manually traverse the person column object to put the object property you're looking for into the added column.  This effectively 'flattens' the object down to the field you want.

    You can then use the added column in your grid.

     

    so;

    ClearCollect(CollectStuff, AddColumns(SharePointList, "FlatAuthor", Author.DisplayName))

    Bear in mind, this only exists in the collection so you can display it in the data table.

     

    complexGrid2_1.PNG

     

    Hope this helps,

     

    RT 

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: DataTable is showing [object Object] in column for data from sharepoint

    Hi Russel,

     

    Your suggestion looks promising let me try this.

     

    Thanks

    Priyank

  • hollyadamson Profile Picture
    3 on at
    DataTable is showing [object Object] in column for data from sharepoint
    I was seeing [object Object] when there were blanks in dataverse rows.
     
    I got round this with If(IsBlank(ThisItem.Whatever), " ", ThisItem.Whatever)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard