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 / Automatically adding r...
Power Apps
Answered

Automatically adding rows with all dropdown values

(1) ShareShare
ReportReport
Posted on by 131

Hei,

 

I have an app where I'm using cascading dropdowns. One of the dropdowns has multiple values. 

Lets say dd1 and dd2 has default value selected by logged on user but there are 4 values to choose from in dd3. Is it possible that when I add the values to a collection that a row is created for all the 4 values in dd3 with previously selected values in dd1 and dd2? So that the user doesn't have to add a row for each value in dd3 manually but 4 rows are created with a single click of a button, value from dd1,dd2 and each of dd3?

Categories:
I have the same question (0)
  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    Is this a combobox or Dropdown and yeh you could use a forall and a patch or a collect of the selecteditems it depends on the nature of the collection and input.

     

    If you are unfamiliar on how to do this:

    do you have the current formula for how it adds one row at a time currently?

     

    and can you confirm if its combobox or dropdown. Sharing the items property and collection name may be helpful. in the forums aswell as the current formula.

  • KalvisT Profile Picture
    131 on at

    This adds the items to collection drp = dropdown and cob=combobox. The one who has multiple values is the drpTjeneste_1

     

    Collect(SLACollection,{Col_Tjeneste:drpTjeneste_1.Selected.Tjeneste,

    Col_Avdeling:drpAvdeling_1.Selected.Result,

    Col_Seksjon:cobSeksjon_1.Selected.Result,

    Col_Date:DatePicker2.SelectedDate,

    Col_SLA:drpSLA.Selected.Value,

    Col_Kundekonsekvens:drpKundekonsekvens.Selected.Value})

  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @KalvisT ,

     

    Do you want to create a row for each of the multiple values selected by Combo Box?

    I agree with what @AJ_Z  said, you could use the ForAll() function to achieve your needs.

    I have made a test for reference.

     

    1,Add 2 DropDown Control and a ComboBox Control.

    vyujincuimsft_0-1642408445674.png

    2.Add a Button Control and apply the following formula on its OnSelect property as:

    ForAll(ComboBox1.SelectedItems,Collect(coltest,{column1:dropdown1.Selected.Value,column2:dropdown2.Selected.Value,column3:Value}))

     

    Best Regards,

    Charlie Choi

  • KalvisT Profile Picture
    131 on at

    Thanks a bunch to you both. Didn't have experience with ForAll before. Now i'll just have to adjust it for my needs and maybe make it so that app selects all available values in the combobox based on the user and other cascading dropdowns. 

  • SA-20081442-0 Profile Picture
    18 on at

    Hi

    I have same issue and tried your fantastic solution, but my result is not the same. I have in all lines same drop down value (the last choosed). I mean if I select 2 item I have 2 rows with same combobox value and not one with each one. what am I doing wrong?

     

    Thank you

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 739 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 268

Last 30 days Overall leaderboard