cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Disabled Gallery Item still selects

I have a gallery with two controls the Display Mode is acertained by a simple evaluation of a formula, there are three items in the gallery two are enabled (edit mode) and one is disabled.

Clicking these toggle visibility of Forms on the screen, one of the forms has a dropdown which gets its selected value from the current selected gallery item, so when I selected disabled item I expect the dropdown to remain the same, however it changes it's value to the disabled item.

So question is does clicking a disabled item changed the selected gallery selected item, and if so should this not be the case

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

@yashag2255,

 

Many thanks for the reply; I only raised the query as a general question as it seems counter productive to have a Gallery selection made by selecting a disabled control.

I think I used a ContextVariable in the end to achieve what I wanted this also enabled me to exclude the disabled items.

View solution in original post

5 REPLIES 5
Super User II
Super User II

Hi,

 

I tried to recreate this but was unable to - Are you sure there's no other object within your gallery (like the gallery card itself) that is enacting Select(Parent) ? Anything within that Card that uses Select(Parent) will then affect which item is selected.

 

Could you creat an App to share with us (no business data, just standalone a simple .msapp) that is able to replicate this issue?

 

Cheers,

ManCat


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Anonymous
Not applicable

@iAm_ManCat,

 

I just created same super simple test app (see attached) and I am still seeing the same issue.. I managed to get around my original problem, but just curious.

 

Andrew

Hi @Anonymous 

 

I carried out some test on the app shares by you, and you can modify few properties as:
 
Button: OnSelect: If(ThisItem.Enabled = true,Set(SelectedEnabled,ThisItem))
 
Text Label: "Tab selected:" & SelectedEnabled.Label
 
This way the SelectedEnabled variable will only be changed when an enabled item is selected from the gallery. If a disabled item is selected this won't change the results.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Anonymous
Not applicable

@yashag2255,

 

Many thanks for the reply; I only raised the query as a general question as it seems counter productive to have a Gallery selection made by selecting a disabled control.

I think I used a ContextVariable in the end to achieve what I wanted this also enabled me to exclude the disabled items.

View solution in original post

Ok, had another dig - I can now answer why it is doing this - I ahve attached a modified version of your App

Answer (it's the understanding and implementation):

 

In your first gallery, you are having the label below it look at Gallery.Selected.Label, but Gallery.Selected is the Selected Gallery Item, not the rectangle that you have disabled!

 

In my second gallery, I have set the OnSelect of that Gallery Item to Set(SelectedItem, ThisItem.Label), and the label below it to "Tab selected:" & SelectedItem

 

We can see that this is now working as expected, with the disabled block not setting any value, the gallery item is still being selected but the button is performing no action 🙂

 


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,269)