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
Solved! Go to Solution.
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.
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! |
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
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.
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! |
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
245 | |
122 | |
84 | |
83 | |
67 |