Hi all,
In a nutshell, I am attempting to build a gallery with a list of records from a Dataverse (for Teams) table and allow users to edit fields in the gallery to update records, as well as create new records. I am having serious trouble properly updating it, though, and I am not sure what to do.
I actually found this tutorial page for pretty much the exact thing I am trying to accomplish:
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/add-editable-tables
This tutorial shows that I should be able to have an editable textbox within a gallery and use the OnChange property to update the data source with the new value of the textbox. They show an animation of this perfectly. However, when I am trying to do this, the OnChange action triggers within typing two characters into the box; I can't just continuously type like they show in the tutorial. So what am I doing wrong, and what is the best solution?
Thanks in advance!
Solved! Go to Solution.
Hi @cah2035 ,
There is no trigger "OnExit`" available unfortunately. What I have done in some of my apps is disable everything else on the screen at the OnChange of the relevant control, but also make visible an "Update" button (in the same card), which runs the code required and re-enables the other controls. A Variable is used with the button visible and all the other controls disabled when it is true (and the reverse on false). I also include a Cancel icon to reset the control and variable if the change is to be cancelled.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @cah2035 ,
Set the DelayOutput of the Text Box to true - it should not trigger the until you finish typing.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz
I have tried this but it doesn't really achieve what I want. Since I am using this to update the same source, once it triggers the field loses focus. What I basically need is a trigger that works on exiting the textbox.
My workaround has been to, instead of using OnChange to patch the data source directly, to patch a collection with the record number so later it can cycle through anything that needs to be updated. This is just a very convoluted way of doing it and I worry that there are unforeseen issues that I will run into.
Hi @cah2035 ,
There is no trigger "OnExit`" available unfortunately. What I have done in some of my apps is disable everything else on the screen at the OnChange of the relevant control, but also make visible an "Update" button (in the same card), which runs the code required and re-enables the other controls. A Variable is used with the button visible and all the other controls disabled when it is true (and the reverse on false). I also include a Cancel icon to reset the control and variable if the change is to be cancelled.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
User | Count |
---|---|
247 | |
105 | |
82 | |
50 | |
43 |