cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BlackRos
Frequent Visitor

Combox SelectMultiple: To change the Counting

I use a combo box with SelectMultiple. Within the field that I set in DisplayMode, I also entered an "All Value" value to select all the elements of the combobox all together in SelectedItems. Everything works fine, but I would like to count the items with one less ("All items"), how do you do it?

Thanks

3 REPLIES 3
BlackRos
Frequent Visitor

I share with you anything.

Su APP
i have
Ser(PresseTuttiUp;false)
and
MyTuttiUP is a Collect with all data;
After i add "Tutti gli UP" in the field "poste_name"
Collect(
MyTuttiUP;
{poste_name: "Tutti gli UP"}
)

ComboBox name is ComboUP_1
Its configuration is:
DisplayField ["poste_name"]
DisplayField ["poste_name"]
Items MyTuttiUP
Select Multiple true
DefaultSelectedItems with If(IsBlank(ComboBoxUP_1Var);
FirstN(MyTuttiUP);
ComboBoxUP_1Var
)

onChange has got this software
Switch(
If(
IsMatch(
Concat(
ComboBoxUP_1.SelectedItems;
poste_name & ";"
);
"Tutti gli UP";
MatchOptions.Contains
);
"true";
"false"
);
"true";
Switch(
PressedTuttiUP;
true;
Set(
ComboBoxUP_1Var;
ComboBoxUP_1.SelectedItems
);
false;
Set(
ComboBoxUP_1Var;
MyTuttiUP
) & Set(
PressedTuttiUP;
true
)
);
"false";
Switch(
PressedTuttiUP;
true;
Set(
ComboBoxUP_1Var;
FirstN(MyTuttiUP)
) & Set(
PressedTuttiUP;
false
);
false;
Set(
ComboBoxUP_1Var;
ComboBoxUP_1.SelectedItems
)
)
)

 

 

v-xida-msft
Community Support
Community Support

Hi @BlackRos ,

Could you please share a bit more about your scenario?

Do you want to count the items when you selected the "All Items" option within the ComboBox?

 

If you want to count the items when you selected the "All Items" option within the ComboBox, please consider take a try with the following formula:

If(
    CountRows(ComboBoxUP_1.SelectedItems) = 1 && ComboBoxUP_1.Selected.Value ="Tutti gli UP",
    CountRows(MyTuttiUP)
)

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

My problem is that I entered the "All UPs" entry in the field of other values. So when I select "All the UPs" the SelectedItems field then contains them all. At that point the combo, by itself, shows me the total of the items, I would like to know if this total can be done so that it doesn't even count "All the UPs"

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,707)