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?
Solved! Go to Solution.
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.
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
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.
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
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})
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.
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
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.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
52 | |
51 | |
36 | |
32 |
User | Count |
---|---|
282 | |
97 | |
89 | |
82 | |
77 |