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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Table Records to JSON ...
Power Apps
Answered

Table Records to JSON string

(0) ShareShare
ReportReport
Posted on by 48

Hello,

 

I have created a sheet with a combo box linked to a table called tblDatabase_Migration, with the items being set by: Filter(tblDatabase_Migrations, active=true) to only show rows that are marked as active. I use the same code in DefaultSelectedItems to make sure they are all selected by default.

 

I need to be able to turn the table into a JSON object, but when I do it only seems to show two fields: the Dataverse table unique id and a column called title from the table. The code I am using is:

 

JSON(cmbTables_Migration_Export.SelectedItems, JSONFormat.IgnoreBinaryData & JSONFormat.IgnoreUnsupportedTypes)
 
It seems to sometimes work fine and then stops working, has anyone come across this issue or have a better way to resolve this?
 
Thank you,
 
Adam
Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    Not sure why this is not working, but if you extract the columns you want explicitly you should be able to get it working consistently. Something like

     

    JSON(
     ForAll(
     cmbTables_Migration_Export.SelectedItems,
     {
     Id: <the column name with id>,
     Name: <name column>,
     Address: <address column>,
     ...
     }
     )
    )

     

    Since you are choosing the columns directly you also won't need the JSONFormat.IgnoreBinaryData & JSONFormat.IgnoreUnsupportedTypes argument to the JSON function.

    Hope this helps!

  • adamjones_kkp Profile Picture
    48 on at

    @CarlosFigueira thank you - this works perfectly

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard