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 / Save record to multipl...
Power Apps
Answered

Save record to multiple entities in Model Driven App?

(0) ShareShare
ReportReport
Posted on by 294

Hi everyone,

I'm looking to integrate my canvas app into a model driven app. In the model driven app, is it possible to save a single record to multiple entities?

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

    Hi @karimabdelrazek ,

    Could you please share a bit more about your scenario?

    Do you want to use your Model-Driven app or the embedded canvas app to save a single record back to multiple entities?

     

    If you want to use Model-Driven app to save single one  record back to multiple entities, I afraid that there is no direct way to achieve your needs. Currently, a Entity form in Model-Driven app could only be bind to single one Entity, which could not save value back to multiple Entities.

     

    If you want to use the embedded canvas app in your Model-Driven App to save a single record back to multiple entities, I think it is possible. Within this embedded canvas app, you need to add your multiple Entities as data source in this canvas app firstly. And then you could use the Patch function to patch single one record back to multiple Entities.

    The Patch formula example as below:

    Patch(
     Entity1,
     Defaults(Entity1),
     {
     Column1: "xxxx",
     Column2: "xxxx",
     ...
     }
    );
    Patch(
     Entity2,
     Defaults(Entity2),
     {
     Column1: "xxxx",
     Column2: "xxxx",
     ...
     }
    );
    Patch(
     Entity3,
     Defaults(Entity3),
     {
     Column1: "xxxx",
     Column2: "xxxx",
     ...
     }
    );
    ...
    ...

    Within above Patch formula, you could also reference the column value from your Model-Driven app form through the ModelDrivenFormIntegration.Item property. For example, you could modify above formula as below:

    Patch(
     Entity1,
     Defaults(Entity1),
     {
     Column1: ModelDrivenFormIntegration.Item.Refernece_Col1,
     Column2: ModelDrivenFormIntegration.Item.Refernece_Col2,
     ...
     }
    );
    Patch(
     Entity2,
     Defaults(Entity2),
     {
     Column1: ModelDrivenFormIntegration.Item.Refernece_Col1,
     Column2: ModelDrivenFormIntegration.Item.Refernece_Col2,
     ...
     }
    );
    Patch(
     Entity3,
     Defaults(Entity3),
     {
     Column1: ModelDrivenFormIntegration.Item.Refernece_Col1,
     Column2: ModelDrivenFormIntegration.Item.Refernece_Col2,
     ...
     }
    );
    ...
    ...

    Patch function in canvas app

     

    More details about embedding canvas app in PowerApps, please check the following blog:

    https://powerapps.microsoft.com/en-us/blog/announcing-the-general-availability-of-embedded-canvas-apps-in-model-driven-forms/

     

    Please try above solution, hopes it could help in your scenario.

     

    Regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard