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 / Best Way to Do So - Vi...
Power Apps
Suggested Answer

Best Way to Do So - View and Edit

(1) ShareShare
ReportReport
Posted on by 7
I am creating a form and I have struggling a lot. I would like to ask which is the best way to display info and edit (no in the existing source) but write to the receiver source (Patch source) Right now. I have a data grid and make the user go to a second screen to display all the particpants but you know which is real trouble, save them (temp) continue filling out the form and patching.  
 
My expected result
 
if the account have 18 participants i am expecting to see 18 records with half of the columns with the same information and the other columns with the edits.
 
I hope you can help me! Thank you
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,943 on at
    Store all participant records in a Power Apps collection and serialize the collection into JSON. Invoke a Dataverse Custom API and pass the JSON payload containing all records in a single call, allowing the API to process and create/update the corresponding records efficiently in Dataverse.
  • Suggested answer
    Valantis Profile Picture
    6,371 on at
     
    The cleanest pattern for your scenario:
     
    1. On screen load, use ClearCollect to load all participants for the selected account into a collection:
    ClearCollect(colParticipants, Filter(SourceTable, AccountID = selectedAccount.ID))
     
    2. Display the collection in a gallery with editable controls inside (text inputs, dropdowns) for the columns the user needs to fill in. The read-only columns just show as labels using ThisItem.ColumnName.
     
    3. As the user edits each row, use Patch to update the collection in memory (not the data source):
    Patch(colParticipants, ThisItem, {EditedColumn: TextInput.Text})
     
    4. On final submit, use ForAll to write all 18 records to the destination list at once:
    ForAll(colParticipants, Patch(DestinationTable, Defaults(DestinationTable), {Col1: ThisRecord.Col1, EditedCol: ThisRecord.EditedCol}))
     
    This keeps everything in memory until submit, avoids multiple screen navigations, and handles all 18 participants in one operation.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

  • WarrenBelz Profile Picture
    155,675 Most Valuable Professional on at
    Adding to @Valantis's suggestion, which is certainly the correct path, I have a blog on an editable gallery, which may be useful to you.
     
    You did not say how you were loading the participants and as a Data Table is read-only, I am assuming you may be selecting a record from another data source, in which case you need to use Collect  - example if you were selecting from a drop-down
    Collect(
       colParticipants,
       {NameField: cbName.Selected.NameField}
    )
    Please stay with points 2 & 3 from @Valantis  - the only small additional item I would add (for performance)
    Patch(
       DestinationTable, 
       ForAll(
          colParticipants As _Data,
          {
              
             NameField: _Data.NameField,
             EditedCol: _Data.EditedCol 
          }
       )
    )
    ForAll is not designed to be a loop, although it can act that way if it contains an action inside it. ForAll creates a Table, which can be Patched in one action to the data source and will run much faster than individual Patches for each record.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • Suggested answer
    Haque Profile Picture
    3,444 on at
    Hi @CU25040303-0,
     
    You can follow the steps below:
     
    Display all participants using a Gallery: We can Bbnd a gallery to the participants data filtered by the selected account. In the gallery, show the participant records with fields split into:
    • Static info (e.g., participant name, ID) as labels (read-only).

    • Editable fields as input controls (TextInput, Dropdown, etc.).

    Store Edits Locally in a Collection: On app or screen load, load the participants into a local collection, e.g.:

    ClearCollect(
        colParticipants,
        Filter(ParticipantsDataSource, AccountID = SelectedAccountID)
    )
    
    • Bind the gallery to colParticipants,

    • Bind input controls inside the gallery to fields in ThisItem (which are from colParticipants).

    • When users edit fields, update the collection automatically by setting the input controls’ Default to the field value and using UpdateIf or Patch on the collection on change, or use two-way binding with EditForm controls.

     

    Continue Filling Out the Main Form: The main form can be on the same screen or another screen. The form can be bound to the account or main record. The participants collection acts as a temporary buffer for participant edits.

     

    Patch All Changes at Once: When the user clicks Save or Submit then Patch the main form data source. Loop through the colParticipants collection and patch each participant record back to the participants data source. Example of pacthcing goes below:

    ForAll(
        colParticipants,
        Patch(
            ParticipantsDataSource,
            LookUp(ParticipantsDataSource, ID = ThisRecord.ID),
            {
                EditableField1: ThisRecord.EditableField1,
                EditableField2: ThisRecord.EditableField2,
                // other fields
            }
        )
    )
    
     
    Optional UX Improvements Use a popup or a side panel instead of navigating to a second screen for participants. Show a count or summary of participants edited. Disable Save button until changes are detected.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard