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 / Patching collection ba...
Power Apps
Suggested Answer

Patching collection back to datasource

(0) ShareShare
ReportReport
Posted on by 315
I have a dataverse table that I'm trying to manipulate data in, but its not working, the patch does not give an error, but it does not patch. 

I have two buttons and a text box. 
 
Button 1 - this works and gets a local collection
 
ClearCollect(
    currentSubmissions1,
    Filter(
        ELT_PA_Inputs,
        Month = monthCounter && Year = yearCounter && Domain = PageTitle
    )
);
 
 
textbox on change value; -this works and changes the value in the local collection
 
Patch(
    currentSubmissions,
    LookUp(
        currentSubmissions,
        Domain = PageTitle && TileName = MetricTitle_5.Text && Metric = "Actual"
    ),
    {Value:Value(Self.Text)}
)

the final stage is trying to patch the collection over the data source. There are some values it does not let me patch (modified, created, etc.) so I have used  show columns to select only the columsn I need to update;
 
Patch(
    ELT_PA_Inputs,
    ShowColumns(
        currentSubmissions,
        ID,
        Value,
        Commentary
    )
);


there is no error, but the data does not change. What am I doing wrong? 
 
Thank you 
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    6,306 Super User 2026 Season 1 on at
     @nick9one1, Can you please try this and revert me.
     
    ForAll(
        currentSubmissions,
        Patch(
            ELT_PA_Inputs,
            LookUp(ELT_PA_Inputs, ELT_PA_Inputs = ThisRecord.ELT_PA_Inputs),  // if Dataverse row ID is stored
            {
                Value: ThisRecord.Value,
                Commentary: ThisRecord.Commentary
            }
        )
    )
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • nick9one1 Profile Picture
    315 on at
    thanks. I'm struggling to make that work;
     
     
    These are the two columns that have ID and GUID
     
    Collection:
     
    I notices that powerapps changes the column names to include cr20b on the collect. 
     
    dataverse:
     
  • nick9one1 Profile Picture
    315 on at
    this seems to work, and patch the data source correctly. 
     
    ForAll(
        currentSubmissions,
        Patch(
            ELT_PA_Inputs,
            LookUp(ELT_PA_Inputs, ID = ThisRecord.ID),  // if Dataverse row ID is stored
            {
                Value: ThisRecord.Value,
                Commentary: ThisRecord.Commentary
            }
        )
    )
     
    Obviously a bit slow 
  • Suggested answer
    11manish Profile Picture
    769 on at
    Try below :
     
    ForAll(
        currentSubmissions,
        Patch(
            ELT_PA_Inputs,
            LookUp(ELT_PA_Inputs, ID = currentSubmissions[@ID]),
            {
                Value: Value,
                Commentary: Commentary
            }
        )
    )
  • nick9one1 Profile Picture
    315 on at
    Thanks, That also works. Bot ForAll is very inefficient and slow. 
     
    Do you have any idea why my original patch statement doesn't work? It's using the exact same fields. 
     
    Patch(
        ELT_PA_Inputs,
        ShowColumns(
            currentSubmissions,
            ID,
            Value,
            Commentary
        )
    );

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard