web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to update database
Power Apps
Unanswered

How to update database

(0) ShareShare
ReportReport
Posted on by 6

Hi all ! 

I am creating app using inventory database , after making collection , I wanna update the data base by showing the impact on data base with the difference,iam using this function but it only update one record. Patch (Sheet1,BrowseGallery1.Selected,{Quantity : Gallery5.Selected.Quantity})

Categories:
I have the same question (0)
  • dinusc Profile Picture
    Microsoft Employee on at

    If I understand you correctly, you pull data from the database into a collection, update it and then want to push all the data from your collection back to the database. If so then this can be done by using the ForAll function to do all the modifications and then by using Patch function to push all the data. 

    You can find more details on ForAll function here: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall

    In your case, the Patch function references just one row. You would have to specify the whole table in the following format:

    Patch(Sheet1, Table_Name)

    Or (for an example with updating just 2 rows with 2 columns)

    Patch(Sheet1, Table({Column1:data1_1, Column2:data1_2},{Column1:data_2_1, Column2:data2_2}))

     

     

  • Mady2010 Profile Picture
    6 on at

    You got me , but it doesnt work 

    What do u mean by data 1 and data 2

     

    could you plz create the formula for me 

    Data base : sheet1

    Data base include (Article ,Description, Quantity)

    Date base is showing in  : BrowseGallery1

    Collection : bill 

    Collection is showing in  : Gally5

    Collection include (Article ,Description, Quantity)

     

    iam using collection to make order from the quantity available in sheet1 (database) , after submting the order i wanna update the Quantity by reducing the data base quantiy , the bottom line is updataing ,

    Database(sheet1)-Collection(bill)=Actual/available Quantity

    and thx for ur time

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard