I have seen that we cannot perform any OnSelect operation on gallery items if they have DisplayMode as View.
Consider basic Gallery with sample data.
Add 2 controls like TextInput in the gallery.
1 should have DisplayMode as Edit and other one as View
Add OnSelect to Notify a sample message when clicked on the control.
You will see that control with DisplayMode as Edit will show the message while control having DisplayMode as View won't trigger the function.
Now, my aim is to create a collection of the item selected when we click on a Control which has DisplayMode as View which is currently not happening.
@Ethan_R OnSelect will not fire when the TextInput is in view mode. You will have to think of an alternate way of collecting your items. If you can attach a screen shot of your App, maybe I can help you figure it out.
Hi @CNT ,
Well here's an image of the App I'm testing on with Sample data,
As you can see,
This gallery items are in View Mode and the checkbox hold different formula which creates different collection and it works since its in Edit Mode.
But If User clicks anywhere on the record, Gallery.Selected only shows data but no OnSelect action is fired.
@Ethan_R As I had mentioned earlier OnSelect will not fire when the TextInput is in View mode but Gallery.Selected will always have the selected Gallery item irrespective where the user has clicked. So you can use this add items to your collection. If you give me more info on this Collection, I can help you further to build it.
So @CNT ,
The checkbox is used for multiple deletion and imagine clicking on the record should be like ClearCollect which holds only 1 record when clicked.
This collection stores few data related to it which is processed on different screen.
Therefore, I want to achieve ClearCollect operation when we click anywhere on record which is DisplayMode = View. Since using checkbox to select record doesn't feel a good alternative way..
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.
At the monthly call, connect with other leaders and find out how community makes your experience even better.