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 / How to add multiple of...
Power Apps
Answered

How to add multiple of the same items to a collection using a dropdown

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

The goal: I am creating an app that is similar to the checkout experience of many websites, where you can view different products. I want to buy a quantity of 10 items of product A. So I created a dropdown with that gives the user the ability to select from 0 to 10, so that they can choose to buy only 1 item of product A or up to 10 items of product A. 

 

My problem, I am struggling to get the dropdown list to add 10 items of product A to a collection. I can only get it to add 1 product at a time, no matter if I select 0, 1, or 10. 

 

Does anyone know how I can code it to do something like Collect(DropDownTable,ThisItem*Dropdown1_1.Selected.Value). Once again, I am trying to code it so that I can add 1 or 10 items of the same product to my cart, named DropDownTable. 

 

Categories:
  • VDS_Mantra Profile Picture
    175 on at

    Hi, 

     

    You can use the combobox Instead of Drop down, In combobox you can choose the multiple items in one go. 

     

    Hope it will resolve your problem.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @VDS_Mantra, 

     

    Thanks for the recommendation, while this will work, I am trying to make it a bit more elegant since i am only trying to add 1 product to my collection. My goal is to add 10 of the same item , rather than 10 different items. Please see the image attached

    7.PNG
  • VDS_Mantra Profile Picture
    175 on at

    Hi, 

     

    I got it now, but we do not have loop option in Power Apps, So as per me it is little tough from Power Apps, but you can use the Power Automate for this action.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @VDS_Mantra 

     

    Thanks for your responses! It is very much appreciated. I will try to see if I can figure it out with power automate. I will post an update here. 

     

    If anyone has any other ideas, please share them. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    I may be missing something but why not just have a field for quantity?
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you want to create a specified number of records based on dropdown selection?

    The point is using forall function.

    I've made a test for your reference:

    1\Add a dropdown control(Dropdown1):

    Items:

     

    [1,2,3,4,5,6,7,8,9,10]

     

    2\Add a button:

    OnSelect:

     

    ForAll(Filter([1,2,3,4,5,6,7,8,9,10],Value<=Dropdown1.Selected.Value),Collect(mydatasource,{Produce:"XXX"}))

     

     60.gif

    Best Regards,

    Bof

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-bofeng-msft ,

     

    This was extremely helpful. Thank you so much for your valuable input. This solved my problem.

     

    Best 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

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard