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 / Recover JSON column fr...
Power Apps
Answered

Recover JSON column from SQL as PowerApps collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello PowerApps Community!

 

Is there a way of parsing a JSON object in a column from an SQL Server database to a collection in PowerApps?

 

I generated the JSON object using the JSON function with data from a collection, but now I want to retrieve the object from the database and revert the process.

 

Right now the JSON in the SQL column looks like this:

 

 

[{"Active":true,"Name":"Option_1"},{"Active":true,"Name":"Option_2"},{"Active":true,"Name":"Option_3"},{"Active":true,"Name":"Option_4"}]

 

 

And I need it in a collection with the same fields (Active and Name). The alternative would be to have 4 additional columns in the table, but I really want to avoid that, as it will probably need to scale in the future without adding columns to the table.

 

EDIT UPDATE:

As of right now, I managed to edit the text value (hard-coding but it's fine). However, when ClearCollect it detects it as text and doesn't create the collection as it should. 

This works (copying and pasting the result from the edited SQL Server column):

ClearCollect(ColTest; {Active:true;Name:"Option_1"};{Active:true;Name:"Option_2"};{Active:true;Name:"Option_3"};{Active:true;Name:"Option_4"})

This doesn't work:

ClearCollect(ColTest; JSONText)

// JSONText = "{Active:true;Name:"Option_1"};{Active:true;Name:"Option_2"};{Active:true;Name:"Option_3"};{Active:true;Name:"Option_4"}"

I know it is because it is taking it as a string, is there a way to avoid that?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    Hi @Anonymous 

    Unfortunately, there's currently no way to do this in PowerApps.

    There's a post in the ideas forum about this. You can vote on this and hopefully MS will add the feature in a future release.

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/Parse-JSON-in-PowerApps/idi-p/359563 

    The typical workaround is to use Flow to do this. 

    Since you're using SQL Server, another approach would be to create a SQL View, and to use the functions in SQL Server to reconstitute your JSON into a recordset.

    https://docs.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?view=sql-server-ver15 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @timl,

     

    Could you please provide more details (or reference) about the Flow workaround? 

     

    Thanks!

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
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard