cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dsab81
Microsoft
Microsoft

Combo box - Item Count display

I have a combo that contains lot of values in drop down. I am able to select one or more from the drop down .

e.g below, i have selected 5 items and the count shows '5 items' . I would like to know , is this count displaying from

 

dsab81_0-1608274610466.png

 

Reason why i would like to know , is because i have a check box ( see pic  'select all') , and when i check the checkbox , i am able to select all items , but the combo box is not displaying any count of items in the combo box.

 

see how it behaves when i check the check box . It actually selected 97 items but the count of items is not showing up in combo box.

dsab81_0-1608275045103.png

 

What am i missing ?

 

LOGIC :

 

Combo box - Items : 

--------------------

Distinct(
'Site Admins',
If(
NewComboBox.Selected.Value = "Supplier",
Supplier,
NewComboBox.Selected.Value = "City",
City,
NewComboBox.Selected.Value = "Site",
'Site Name'
)
)

 

Combo Box - On change :

----------------------------

Clear(SelectedPerson); // Add this formula

ForAll(

// Add this formula

'ComboBox-Bcc'.SelectedItems,

Collect(

SelectedPerson,

Filter(

'Site Admins',

If( // Modify formula here

NewComboBox.Selected.Value = "Supplier",

Supplier = Result,

NewComboBox.Selected.Value = "City",

City = Result,

NewComboBox.Selected.Value = "Site",

'Site Name' = Result

)

)

)

);
If((CountRows(SelectedPerson)+CountRows('ComboBox-To'.SelectedItems)+CountRows('ComboBox-Cc'.SelectedItems)) >500,UpdateContext({PopUpCount: true}))

 

 

Combo box - On Select :

--------------------------

false

 

Check Box - On Check :

---------------------------

If(
Checkbox1.Value=true,
Set(
Glob,
Distinct(
'Site Admins',
Switch(
NewComboBox.Selected.Value,
"Site", 'Site Name',
"Supplier", Supplier,
"City", City
)
)
),
Blank()
)

2 REPLIES 2
gabibalaban
Super User
Super User

Hi @dsab81 ,

 

Please set up your DefaultSelectedItems property of your combobox control based on checkbox control value, something like:

If(CheckBox.Value, yoursource)

 

Hope it helps !

oh! but my default selected value for the combo box is set global value named : glob

That 'glob' is used in the check box - 'on check' property  ( see the formulae of on check property in my post above )

 

How do we set it now ?

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,650)