cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

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
Highlighted
Resolver II
Resolver II

Re: Disabled Gallery Item still selects

@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
Highlighted
Super User
Super User

Re: Disabled Gallery Item still selects

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


Highlighted
Resolver II
Resolver II

Re: Disabled Gallery Item still selects

@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

Highlighted
Dual Super User III
Dual Super User III

Re: Disabled Gallery Item still selects

Hi @AndrewCarter 

 

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!
Highlighted
Resolver II
Resolver II

Re: Disabled Gallery Item still selects

@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

Highlighted
Super User
Super User

Re: Disabled Gallery Item still selects

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,996)