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 / Update data source and...
Power Apps
Unanswered

Update data source and collection

(0) ShareShare
ReportReport
Posted on by 15

I am pretty new to Powerapps and have created an app to mess around with while I learn how to do some of the things that will be needed when I build the app I need.

 

I am running into an issue trying to update both the original data source (stored in One Drive) and a collection.

 

The Basics:

Collection Name: Testcoll

Data source name: Testtable

Table name in data source: Testtbl (I know, very creative)

Data card name: Store #

Text Input Box: Storetst

 

I would like to have a button that saves the info entered in the text input box (Storetst) to both an existing collection (Testcoll) as well as the original data source.  I have tried a few syntax variations but I can only get the Collection to update not the data source.

 

If someone could please give me some guidance it would be greatly appreciated. Also, if possible, can you walk me through the syntax you would use so I can understand how it works. I would like to learn where I am making mistakes and how the correct syntax works.

 

Please and Thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Jhogan21 ,

    Do you want to add a new record into your existing Collection and the original Excel table data source?

    Could you please share a bit more about the formula you used within your app?

     

    Based on the needs that you mentioned, I think the Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

    Set the OnSelect property of the "Submit" button to following formula:

    Patch( /* <-- Add new reocrd into your Collection -- Testcoll */
     Testcoll,
     Defaults(Testcoll),
     {
     'Store #': Storetst.Text
     }
    );
    Patch( /* <-- Add new reocrd into your Excel table -- Testtbl */
      Testtbl,
     Defaults(Testtbl),
     {
     'Store #': Storetst.Text
     }
    )

    Or

    Concurrent( /* <-- Execute the following two Patch formula at the same time */
     Patch( /* <-- Add new reocrd into your Collection -- Testcoll */ 
    Testcoll,
    Defaults(Testcoll),
    { 'Store #': Storetst.Text }
    ),
    Patch( /* <-- Add new reocrd into your Excel table -- Testtbl */
    Testtbl
    ,
    Defaults(Testtbl),
    { 'Store #': Storetst.Text }
    ) )

    More details about Patch function and Concurrent function, please check the following article:

    Patch function

    Concurrent function

     

    Best regards,

  • Community Power Platform Member Profile Picture
    on at

    Thanks for posting in the community @Jhogan21 - can you review the above reply and update the thread if it was helpful? 

     

    Thank you,

     

    @Anonymous 

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard