I am trying to make a link based on a field in PowerApps. I want to be able to click on an icon inside of a datacard from a form. However, when I click on that icon nothing happens. It works outside of the Data Card, but I want the icon to be able to scroll with the card so I have to put it inside. Does anybody have any suggestions?
Solved! Go to Solution.
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...
This oversight badly needs a fix!
Field's within a Form's Card often need a little help Icon to use OnSelect and open a help box with guidance to user on what to enter. Pretty basic requirement!!
Currently, it works fine in Edit mode, but not in View mode before they read the help and hit edit! As @DavesTechTips notes, there should be no untouchable wiring from Card to Form Mode, we can use Parent if nec. Either way, I see no real reason why OnSelect and similar within Card can't fire in View mode!
Will try and get support on this, feels like a bug/issue rather than Idea. Severely hampering app usability.
Add a custom card with just that button you want to work in View mode.
Load the form in Edit mode.
Set all the data cards except the one with the button to DisplayMode.View
Unfortunately it's not possible to do it the other way round. If Parent.DisplayMode is View, you cannot set a single card to DisplayMode.Edit. View is prevalent.
Its not in view mode!
I need a button to fill the current location and I have a button (connected to power automate to get that location) that works if it is outside the form but when I have the same button inside the datacard I want, it doesn't work!
This image doesn't work and I have the form always in edit mode.
I figured out a workaround by myself!
I created a component only with my button and defined custom properties to return the location address.
Thanks and hope it helps someone!
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!