This happens because the Form control does not allow user interaction in "View" mode. Even when the child control's mode (Icon control in this case) is set to "Edit", the parent DisplayMode would be respected.
Similar case can be reproduced with other container controls. Example:
1. Create a blank app and add a Gallery control.
2. Add a Button control to the gallery and set the OnSelect formula
3. Set Gallery1.DisplayMode = DisplayMode.View
4. Set Button1.DisplayMode = DisplayMode.Edit
5. Click on the button and observe that the OnSelect formula is not executed. Other interactions (such as Hover effects) do not work as well.
This works, but I have tons cards. This is going to take me a while change all of them and to figure out the best way to go back and forth from edit to display on each card.
Thanks for figuring this out!
I can't help to feel that the DisplayMode of the controls inside the card should be separate from the card. If they need to be the same as the card one should use Parent.DisplayMode.
@ChrisRunbelievable but true. So I navigate now using EditForm(ViewForm1) to bring it up in Edit mode, but I had to disable all the cards with data controls, except the one with the button I need to work in View mode...
Check out these cool Power Apps & vote on your favorite!
Check out whats happening in Power Apps
FIll out a quick form to claim your community user group member badge today!
Features releasing from October 2020 through March 2021