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 / Saving data from one f...
Power Apps
Answered

Saving data from one form to Two CDS entities

(0) ShareShare
ReportReport
Posted on by 377

Hello All,

 

I have a scenario where I have two CDS entities with the exact schema (Main Table and it's History table) but with just one column extra in table # 2. 

 

Records should be saved to both these entities from the same form at the same time. Meaning, the user enters data in the form just once and I have to persist the entered data in both the entities at the click of the Save button

 

I have read about Patch() but was not entirely sure if that would work in this scenario.  I was also thinking of having another  hidden form and at the click of Save, set the value of its controls to the values from the main "visible" form and Submit both forms at the click of Save. 

 

Also, this is different than Audit Logs that PowerApps offers, as saving the data to both the entities is actually part of the main business transaction process and the clients are requiring it. 

 

Can you please let me know how to go about doing it in a Canvas App?

 

Thanks

 

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    As you stated, I will recommend Patch at the Onsuccess property of the Form. Thus whenever the form submitted successfully, then it will Patch to the second table. Or use Patch for both Tables

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • rprahalad Profile Picture
    377 on at

    Thanks @eka24 !  I shall try that out.

     

    I am very  new to PowerApps and Flows and so, just wanted to run this by you. If I do use Flow, can I get the functionality that is similar to an INSERT trigger in SQL Server?  Meaning, On Insert of a new row in Table 1, can I capture all the values entered on the form from within a flow and insert it into Table#2?

     

    --RP

     

     

     

  • Verified answer
    eka24 Profile Picture
    20,923 on at

    Yes you can use Power Automate. Watch this tutorial

    https://youtu.be/eDOwoPG9ua8

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    rprahalad Profile Picture
    377 on at

    Thanks Eka24. I shall go through it. Appreciate your response. 

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 765 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 272

Last 30 days Overall leaderboard