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 / Is it possible to comb...
Power Apps
Unanswered

Is it possible to combine several collections in to one?

(0) ShareShare
ReportReport
Posted on by

Dear Experts, 

 

To manage the inventory currently I am using the Patch function. But It gives me ETAG error even though I moved the refresh to the beginning. And also I feel that It is not user friendly to press a button every time when user do any changes. Therefore I am thinking about collections. 

 

e.g 

For Purchases - I can create a collection with the Item/model and qty

For Sales - Item/Model and qty

Purchase returns - Item/Model qty

etc

 

the unique identifier is the Item or Model (Let's say model). 

 

So If I can combine those different collections to a single collection with Model that will solve my concern i guess. 

 

Is this a good idea and can we do this?

 

Osmand 

 

Categories:
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Hi @OsmandFernando,

    Can you please share a bit more about your scenario? Or may be answer the following questions:

    1. When does the user have to currently click a button?
    2. Is it a button to update the data source when the user makes any changes?
    3. Are you trying to get rid of this button?
    4. What are you imagining the 3 collections for?
    5. Will the 3 collections all have the same records?
    6. Will the 3 collections all have the same columns?
    7. Can you explain a bit more about why do you want to them combine the 3 collections into 1? Is it so that you can then se that 1 collection to patch the updates?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://thepoweraddict.com
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @OsmandFernando ,

     

    Please share the related formulas and explain with some sample data or screenshots. Do mask sensitive data before uploading.

     

    Regards,

    Mona

  • OsmandFernando Profile Picture
    on at

    @PowerAddict  and @v-monli-msft  hope following explanation will provide details and answers for your questions. 

     

    1. I have included patch function to buttons to update the inventory SP list, following example is from Sales module.  You can see the + button under add items. When the user press that button qty will update in the inventory. Function is as follows, 

     

    Refresh(SalesDetails_1);IfError(If(ComboBox2_1.Selected.Value in Inventory.ModelNumber,Patch(Inventory,LookUp(Inventory,ModelNumber=First(ComboBox2_1.SelectedItems).Value),{ModelNumber:ComboBox2_1.Selected.Value,Brand:Label27_1.Text,SalesQty:LookUp(Inventory,ModelNumber=First(ComboBox2_1.SelectedItems).Value).SalesQty+qtyinput.Text}),Patch(Inventory,Defaults(Inventory),{ModelNumber:First(ComboBox2_1.SelectedItems).Value,Brand:Label27_1.Text,SalesQty:qtyinput.Text})),Notify("Error, details not saved",NotificationType.Error),Notify("Data Saved",NotificationType.Success));Set(slsv,true)

     

    I want to get rid of these buttons because user need to click 2 buttons. (e.g when user clicks on the + button save button will open) I cannot include to the Save data in to the Sales Details list and update inventory to a single button because ETAG error comes time to time. 

     

    Capture.PNG

     

    That is why I am thinking of collections. Separate Collections should create from, following lists, 

    • Salesdetails
    • Purchasedetails
    • SalesReturns
    • Purchasereturns

    The unique identifier is the Model number. And only need to show model number and qty, then each collection will have, 

     

    • Model
    • Qty

    Then the combined list should have, 

     

    • Model
    • qty Purchased (Cumulative)
    • qty Sold (Cumulative)
    • Qty Returned to supplier (Cumulative)
    • Qty Returned from customer  (Cumulative)

    That is the picture in my mind now for collections

     

    Hope this is helpful

     

    Osmand

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard