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 353
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
    7,431 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
    353 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
    353 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
    3,333 on at
    Try below :
     
    ForAll(
        currentSubmissions,
        Patch(
            ELT_PA_Inputs,
            LookUp(ELT_PA_Inputs, ID = currentSubmissions[@ID]),
            {
                Value: Value,
                Commentary: Commentary
            }
        )
    )
  • nick9one1 Profile Picture
    353 on at
    Thanks, That also works. But '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
        )
    );
  • Suggested answer
    SebS Profile Picture
    4,826 Super User 2026 Season 1 on at
    @nick9one1 

    By using show collumns you braking metadata (stripping it off) what is required for Patch processing Batch logic behinde the scen
     
    Patch(
        ELT_PA_Inputs,
        currentSubmissions    
    );

    It would be quicker if you just use this aprouch and check if it will work for you
  • nick9one1 Profile Picture
    353 on at
    I cant do that as the table has columns that cant be changed (e.g. modified by, and modified). 

    If I do this;
    Patch(
        ELT_PA_Inputs,
        currentSubmissions    
    );
    I get this error;
     

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 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard