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 / SharePoint + PowerApps...
Power Apps
Unanswered

SharePoint + PowerApps - JSON Array to Gallery Items and vice versa

(0) ShareShare
ReportReport
Posted on by 77

Dear All,

 

I am working on a SharePoint Form PowerApps where we have a Multi-Line Text Box having JSON Array like below

[

{

"Name": "ABC",

"Project": "Project 1",

"Salary": 100000

},

{

"Name": "XYZ",

"Project": "Project 2",

"Salary": 150000

}

]

 

And we have one gallery in the Form having dynamic grid structure and these 3 columns as "Name", "Project" & "Salary". 

When user will open this form in edit mode, we want to display this column value data (which is in JSON Array) to that dynamic grid. Rows will be different depending upon business so Gallery should load these rows dynamically. User should edit it and then once click on Update it should be added to this Multi-Line Text field in JSON format.

 

Can you please help me with this?

 

Thanks,

Sanjay

Categories:
I have the same question (0)
  • Verified answer
    Anchov Profile Picture
    1,986 on at

    Let's assume you have your target SharePoint record stored in a Variable called varCurrentRecord, and the field name of the multi-line text field (that stores your JSON string) is called ProjectDetails.

    To parse the JSON string into a collection, you would use a formula like:

     

    ClearCollect(
     colProjectDetails,
     ForAll(
     Table(ParseJSON(varCurrentRecord.ProjectDetails)),
     {
     Name: Text(Value.Name),
     Project: Text(Value.Project),
     Salary: Value(Value.Salary)
    
     }
     )
    );

     

    After parsing the JSON string into a collection, you can display your Project details in a gallery. This allows you to perform adding, editing, and deletion just like any other gallery. When you're ready to save the data back to SharePoint, you can convert it back to a JSON string using the following approach:

     

     

     

    Patch(
     'SharePoint List', 
     LookUp('SharePoint List', ID = varCurrentRecord.ID), 
     {
     ProjectDetails: JSON(colProjectDetails, JSONFormat.Compact)
     }
    );

     


    See https://www.youtube.com/watch?v=FqfLiJDdC3Q by Reza for full explanation.


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers!
    Rick Hurt

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard