cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mickowl
Helper II
Helper II

Icon visible/Not visible when text of a dropdown does not appear in a Gallery

Hi

 

I am simply trying to add the warning icon to appear when : The text selected in the Staff Dropdown (Dropdown 12) is equal to any of the staff names that appear in the gallery on the left. So in the case below, they have selected Ceo so that is fine, but if they selected either 'Cathy' or 'Anna' i would want the icon to be visible. I thought i would look at the gallery.Allitems.Staff but this doesnt work. 

 

I can get this to work if i do Visible property of Icon = If(Dropdown12.SelectedText.Value = Subtitle2_13.Text && Form1_1.Mode <>FormMode.View, true, false) but when i do it this way it will only pick up what is in the Subtitle2_13 - so if i pick Anna from the staff drop down it the icon appears (which is what i want)  and then i pick someone else who is not in the gallery it disappears (again is what i want)  BUT when i pick Cathy (appears in the gallery) the icon does not show (NOT what i want)

Mickowl_0-1652700341014.png

 

Any help appreciated

 

Thanks

 

Michael 

1 ACCEPTED SOLUTION

Accepted Solutions

Ah, got it.

 

This should work:

If(Dropdown12.SelectedText.Value in FilterTestGallery_2.AllItems.Staff && Form1_1.Mode <> FormMode.View, true, false)

View solution in original post

4 REPLIES 4
RoboHeart
Helper I
Helper I

Hi @Mickowl 

 

if I got it right than you just need to write something like this:

If(Dropdown12.SelectedText.Value = FilterTestGallery_2.Selected.Staff && Form1_1.Mode <> FormMode.View, true, false)

because you just want to compare it with the selected item in the gallery, right?

Mickowl
Helper II
Helper II

Hi, thanks for replying.

 

I want to compare it to ALL the names in the gallery - so in the screenshot you can see 2 names - Cathy and Anna - On another date there could be 1 there could be 12 names in that gallery - i want it to look at all the names in the gallery and show me the Icon if they pick any of those 12 names in the Staff dropdown - so not just looking at the selected item.

 

Thanks 

Ah, got it.

 

This should work:

If(Dropdown12.SelectedText.Value in FilterTestGallery_2.AllItems.Staff && Form1_1.Mode <> FormMode.View, true, false)
Mickowl
Helper II
Helper II

Hi RoboHeart

 

Thank you for that - works perfectly!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,735)