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

Notifications

Announcements

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
    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

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard