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 / Using 2 Collections to...
Power Apps
Answered

Using 2 Collections to Patch/Submit

(0) ShareShare
ReportReport
Posted on by 44

I have an app I'm building and it asks the user a couple questions, then, click Next button.

The next screen asks them a lot more information, then, click Review button.

The Review screen shows them the details they've submitted from the first two screens, via a gallery.

 

Question: The data I'm collecting from screen1 is personal information, into RequestorInfo collection

The data I'm collecting from screen2 is computer related information into RequestDetails collection

I want screen2 to use/patch a combination of RequestorInfo and RequestDetails collections. I was hoping that I could simply reference both collections in my patch statement, but that doesn't seem to work, or else, I'm just doing it wrong. 🙂

 

Thoughts to make this work? I'm not tied to 2 collections, just thought it'd be easier to do it this way, clearly I was wrong. 😉

 

Thanks in advance.

Categories:
I have the same question (0)
  • Verified answer
    ThatAPIGuy Profile Picture
    925 on at

    You can use Patch statement to create new records in your data source by using this

     

    Patch( Customers, Defaults( Customer ), { Name: “Contoso” } )

     

    In your case, you prbably need to use forms on both the screens and then use something like this -

     

    Patch (Requests, Defaults(Requests), RequestorInfoForm.Updates, RequestDetailsForm.Updates)

     

    I hope this helps.

     

    For more documentation visit this link - 

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

     

    Thanks

    Vivek Bavishi / That API Guy

    youtube.com/thatapiguy 

  • v-sheyu-msft Profile Picture
    Microsoft Employee on at

    Hi @WI-User-01,

    Can you share a bit more about your issue ?

    Can you show me how to create a collection ?

    Can you show me how to entry the values ?

     

    If you entry the values by the custom controls in both screens, you can use formula like this :

    I assume that RequestorInfo collection and RequestDetails collection have a same column named “Id.

     

    Patch(RequestAll,Defaults(RequestAll),LookUp(RequestorInfo,Id=1),LookUp(RequestDetails,Id=1))

    If you entry the values by the Edit Form in both screens, you can use formula like this :

     

    Patch(RequestAll,Defaults(RequestAll),RequestorInfoForm.Updates,RequestDetailsForm.Updates)

     

    Regards,

    Eason

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard