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 / patch records in anoth...
Power Apps
Unanswered

patch records in another dataverse table from one table

(0) ShareShare
ReportReport
Posted on by 34

Hi All,

 

I am trying to patch records from one dataverse table to another table using forall but its not working

so i have two table table one and table 2 and code is unique value for both tables and i want to update description and user from table one to table2 when i select multiple items from a gallery using a checkbox

 

Here is the formula i am using:

Patch(
Table2,
ForAll(
Filter(
gal_start.AllItems,
galcheckbox.Value = true
),
{
Code: lbl_codeVal.Text,
Description: lbl_Name.Text,
User: LookUp(
Users,
'Full Name' = drpdownuser.Selected.'Full Name'
)
}
)
) is this the correct way to do update records within dataverse tables or should i use power automate please suggest?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Matbrown 

    ForAll(
     Table2, UpdateIf(
     gal_start.AllItems,galcheckbox.Value,
     {Code: lbl_codeVal.Text,
     Description: lbl_Name.Text,
     User: LookUp(Users,'Full Name' = 
     drpdownuser.Selected.'Full Name'
     )
     }
     )
    )
  • Matbrown Profile Picture
    34 on at

    @Drrickryp this formula is giving error that the first argument of updateif should be a collection can you please help?

    forAll(Table2,
    UpdateIf(
    gal_start.AllItems,galcheckbox.Value,

    {

    {Code: lbl_codeVal.Text,
    Description: lbl_Name.Text,
    User: LookUp(Users,'Full Name' =
    drpdownuser.Selected.'Full Name'
    )

    }
    ))

    Matbrown_0-1654150839216.png

     

  • Matbrown Profile Picture
    34 on at

    @Drrickryp any help?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Matbrown 

    If you have as the OnSelect of the checkbox, Collect(coltable, ThisItem) and for the UnSelect: Remove(coltable,ThisItem) you will create a collection of the checked items in your gallery as you go.  You can then simply patch Table2 with the coltable collection in a button with OnSelect

    Patch(
     Table2, ID = coltableID, {Code: lbl_codeVal.Text,
     Description: lbl_Name.Text,
     User: LookUp(Users,'Full Name' =
     drpdownuser.Selected.'Full Name'
     )
     }
    )

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard