Canvas Apps: Build Comments with JSON
Power Apps
Feb 18, 2026 3:13 AM

Canvas Apps: Build Comments with JSON

by HubSite 365 about Microsoft

Software Development Redmond, Washington

Microsoft expert demos Power Apps Canvas comments using JSON in a single field for cleaner, maintainable Power Platform

Key insights

  • JSON comments in one field
    Store all comments as a JSON array in a single multi-line text field (for example in SharePoint). This keeps related comments together and avoids extra lists or tables.
  • ParseJSON and collections
    Load and parse the JSON with ParseJSON() and Table() to create a collection. Bind that collection to galleries to show comments in the app.
  • Adding and updating comments
    Append new comment objects to the JSON and Patch the data source. Increment IDs, clear inputs after save, and use array operations or concatenation to keep the JSON valid.
  • Threaded display and replies
    Represent replies as nested arrays (e.g., "replies") inside each comment object. Filter the parsed collection by item ID to show comments per record and render threads in nested galleries.
  • Power Automate and SharePoint integration
    Call flows to send notifications or to post comments via SharePoint APIs. Use JSON formatting to preserve newlines and to transfer comment objects between services.
  • Benefits and limitations
    This pattern is flexible, offline-capable, and cost-effective because it avoids extra lists and premium connectors. Limitations include ParseJSON returning untyped values (convert with Text()), multi-line field size limits, and extra handling for deep nesting or very large threads.

By Microsoft: A recent demo from the Microsoft 365 & Power Platform Community call showcased a practical method to build a comments section inside Canvas Apps. The video, presented by Ben Fetters, walks developers through storing comments as structured JSON in a single field and then parsing that data back into collections for display. As a result, the approach aims to keep apps simpler and easier to maintain while supporting threaded and nested replies. Moreover, the demo emphasizes real-world patterns that work well with common data sources like SharePoint.


Overview of the Demo and Core Technique

Firstly, the presenter explains the basic idea: instead of using separate lists or tables for comments, keep all comment data in one rolling JSON field. Then, at runtime, parse that JSON into in-memory collections and bind those collections to UI elements such as galleries for display. This technique relies on Power Apps formulas like ParseJSON, Table, and collection functions to convert and manage comment objects. Consequently, apps can render threaded conversations while avoiding the complexity of multiple relational lists.


In addition, Ben shows how to append new comments by updating the JSON object and writing it back to the data store, typically a multi-line text field in SharePoint. He points out practical tips such as incrementing comment IDs, resetting input controls after save, and filtering comments by the relevant record ID. For richer behaviors, the demo links the JSON flow to automated processes for notifications using Power Automate. Therefore, developers can preserve newlines and structure when passing comment data between systems.


How It Works in Practice

To load comments, the app retrieves the JSON string from the data source and runs it through ParseJSON before collecting it into a gallery-friendly table. With this parsed data, the UI can show metadata like user IDs, timestamps, and nested replies without multiple queries. Ben also demonstrates handling nested replies by representing them as arrays inside each comment object, which the app flattens or expands as needed. As a result, viewers get a responsive comment view driven by client-side collections rather than constant server calls.


When adding a comment, the app constructs a new JSON object and concatenates it into the rolling JSON, then patches the record back to SharePoint. This keeps the write operation compact, but it also requires care when multiple users update the same field simultaneously. As a mitigation, the demo recommends testing conflict scenarios and considering light-weight locking or revision checking when concurrency matters. Thus, the technique balances simplicity with the need to manage concurrent edits.


Advantages and Tradeoffs

On the plus side, storing comments as JSON simplifies data models and reduces the need for extra lists or complex joins, which in turn lowers maintenance overhead. The approach also enables offline scenarios where local collections hold comments until the device reconnects, and it avoids premium connectors for basic functionality. However, tradeoffs arise: a single text field has size limits, and very large threads can degrade performance when parsing or patching the whole JSON blob.


Moreover, the demo highlights limitations of ParseJSON, such as returning untyped objects that require explicit conversions to text or numbers inside formulas. Deep nesting can also complicate parsing logic and increase app complexity. Therefore, while the method offers flexibility and cost-effectiveness, teams must weigh scalability and concurrency concerns against the benefit of a simpler schema.


Challenges and Best Practices

Practitioners should plan for three common challenges: data size limits, concurrent updates, and complex nested structures. To address these, Ben suggests using multi-line text fields that support larger content, introducing lightweight concurrency checks, and limiting nesting depth to keep parsing manageable. In addition, integrating Power Automate for notifications or moderation can move heavier processing off the client and improve responsiveness.


Finally, the demo recommends practical habits: give each comment a stable ID, reset inputs after saves to improve UX, and test with realistic volumes of comments. Developers should also document the JSON schema and include conversion routines to handle data type quirks from ParseJSON. By following these steps, teams can balance maintainability with performance and deliver a reliable in-app comments experience.


Conclusion and Next Steps

Overall, the video provides a clear, hands-on pattern that helps Power Apps creators add functional comment sections without complex server schemas. It showcases how to use JSON as a compact, flexible store that works well with Canvas Apps and SharePoint, while also highlighting the tradeoffs around scale and concurrency. Readers and developers should view this method as a pragmatic choice for many use cases, though they should plan additional architecture when expecting high volume or strict audit requirements. In short, the demo offers actionable guidance and sensible practices for building maintainable comment features inside Power Apps.


Power Apps - Canvas Apps: Build Comments with JSON

Keywords

comments section Canvas Apps,Power Apps JSON comments,create comments Canvas App,Canvas App comment system tutorial,Power Apps comments component,save comments to Dataverse Power Apps,parse JSON in Power Apps comments,custom comments control Canvas Apps