Hi there.
I am using a Gallery object called Gallery1 and I have set Items as mypics
Then on screen visible I use:
ClearCollect(mypics, 'My Document Library');
So I am able to see all of my images. In this screen I have an Image Upload control which runs a Power Automate flow to automatically upload the selected image to the Document Library with appropriate code in OnSelect event of AddMediaButton. After the flow run inside the OnSelect I tried this:
Refresh('My Document Library');
ClearCollect(mypics, 'My Document Library');
Reset(Gallery1);
Reset([@Gallery1]);
But nothing actually works for me to get the just uploaded image.
Any help?
Solved! Go to Solution.
Hi @pm4698 ,
When you run a Flow, it is "outside" Power Apps and may take some seconds to run. Putting the refresh (which you do not actually need) and collect in the code will run before the Flow has finished. You need to have a separate button/icon for the user to run this after they have uploaded the photo.
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 @pm4698 ,
When you run a Flow, it is "outside" Power Apps and may take some seconds to run. Putting the refresh (which you do not actually need) and collect in the code will run before the Flow has finished. You need to have a separate button/icon for the user to run this after they have uploaded the photo.
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 @pm4698 ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
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
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 |
---|---|
195 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
255 | |
119 | |
86 | |
84 | |
81 |