Thank you. As always, a great video. Instead of showing "Please select an Item to continue" I prefer to save the previously selected item and revert back to it if the user cancels the form.
Thank you for the video. Excellent as always. Sometimes I use your method for my needs. But why don't you use the Default property of the gallery? If you set it to '{}', you just have to use 'Reset()', and that works. Using a variable is better when you change screens, but that's not the case here.
Totally could do that. Just wasn't were my head was when I was building this one. 😎 That is the fun of Power Apps different ways to do different things.
What a superb video again Shane. I'm so happy with this info!! I changed a view apps I created lately. Thanks a lot, from a rainy and grey Netherlands. Regards, Steven
Thank you for this valuable information, same recommendation as Wonder Laura is doing in one of here Power Hour Sessions. Sharing is caring and Community Rocks!
I have, it makes me sad. 🥲 DelayOutput missing on Text Inputs was one someone pointed out this morning. He asked me for a work around and I had no idea 🥲
Hi love your vids! Could I maybe suggest making a video on how to implement a two sided swipe to confirm/delete an item in a vertical gallery? Im interested what you could come up with your insight :)
I have never really thought about it. In my head there isn't a great way to do it. But if I come up with something I will be sure to share. 😎 Thanks for the idea
love it! As i've watched you over the years, i've seen you advocate for this method but was never clear why. Now i am !! BTW, how would you default to the 1st record in Gal (in view mode) instead of the option your students opted for with the instruction to select an item? Cheers from the friendly frog!
Love your videos. I was wondering why you dont set the gallery default to {} and add a reset Gallery command to the new and unselect button. Is there a specific reason?
Nope, I have never tried that way. Interesting. I still enjoy my variable control and using it across multiple screens but I will try your way next time and give it a look. Thanks
Hi Shane. Love your videos. I am new to PowerApps and working on implementing a lot of your suggestions in my first couple of apps. This one is great and has helped a lot. I am confused with a delete button. I have this function on my Delete button. After the record is deleted, the form still shows the remnants of the deleted record. How do I fix this? UpdateContext( { deleteMode: true, deleteCancelled: false, selectedRecord: RecordsGallery1.Selected } ) I have tried changing RecordsGallery1.Selected to varRecord and it still seems to delete the record but still has the remnants of the deleted record.
Hi, Thanks four your great videos, Shane. I want to point out that in a scenario, where you e.g. have buttons to perhaps trigger a workflow which is updating the items in the SharePoint List directly I might need to call Refresh(list) to update the data. Then your approach does not work because the locRecord variable does not update to the new data. I cannot find any hook where to update that. If you manually switch items then everything is okay, but that is not what I want to see. If the user clicks the button, the workflow runs successfully I want the user to immediately see the updated data. Any Ideas to that?
After you do the Refresh then Set(varRecord, Lookup(datasource, ID = varRecord.ID)) this will get the refreshed version of the record in your variable.
It depends on the scenario. If a gallery is going to be reused exactly the same then yes a component makes sense. But if each one is unuqie then it would be more trouble than it was worth.
By the way, what's up with those "extra rectangle things" that they add in to gallery templates? Do they serve some special purpose, or have some kind of different functionality? Do I lose anything by deleting them?
When I try adding the UpdateContext code to the OnSelect event on a gallery it does not store the record in the varRecord variable. I followed the tutorial to the letter. Any idea why this might be happening? Is there a app level setting I need to enable?
It seems I was using a "Vertical gallery" component instead of a "Blank vertical gallery" component. Not sure why the former doesn't work with this method, but switching it solved the problem. If anyone knows the point of using a "Vertical gallery", I'm all ears.
I encountered a problem. When clicking on the gallery, the selection will not trigger the template fill when you click on components in the layout template, im using blank layout gallery and adds components on it. But when you click on the layout template outside those text box , image, The selection template fill color is okay .
I am little confused regarding title of this video, title should be "Don't use PowerApps Gallery ISSelected Item" or "Don't use PowerApps Gallery Selected Item"? because you are still using gallery.selected to show selected item from gallery to form if I am getting you correctly.
Thank you. As always, a great video. Instead of showing "Please select an Item to continue" I prefer to save the previously selected item and revert back to it if the user cancels the form.
Fancy, I like it. 😎
"Evil trash can" gave me a much needed Monday morning chuckle :)
That is the fun, you never know the dumb things I will say 😂
Thank you for the video. Excellent as always. Sometimes I use your method for my needs. But why don't you use the Default property of the gallery? If you set it to '{}', you just have to use 'Reset()', and that works. Using a variable is better when you change screens, but that's not the case here.
Totally could do that. Just wasn't were my head was when I was building this one. 😎 That is the fun of Power Apps different ways to do different things.
What a superb video again Shane. I'm so happy with this info!! I changed a view apps I created lately.
Thanks a lot, from a rainy and grey Netherlands.
Regards, Steven
Fantastic! Have a great weekend 😎
Thank you for this valuable information, same recommendation as Wonder Laura is doing in one of here Power Hour Sessions. Sharing is caring and Community Rocks!
Laura is awesome. Didn’t know she showed it in power hour recently. My first video with it was 3 years ago. 😎
Best way to deal with Gallery.Selected! Thanks, Shane!
PS. Have you noticed the removal of Fill property in modern buttons? :)
I have, it makes me sad. 🥲 DelayOutput missing on Text Inputs was one someone pointed out this morning. He asked me for a work around and I had no idea 🥲
This is insightful! Thanks for the tutorial
Glad to help! 😎
Hi love your vids! Could I maybe suggest making a video on how to implement a two sided swipe to confirm/delete an item in a vertical gallery? Im interested what you could come up with your insight :)
I have never really thought about it. In my head there isn't a great way to do it. But if I come up with something I will be sure to share. 😎 Thanks for the idea
love it! As i've watched you over the years, i've seen you advocate for this method but was never clear why. Now i am !! BTW, how would you default to the 1st record in Gal (in view mode) instead of the option your students opted for with the instruction to select an item? Cheers from the friendly frog!
Glad to help my green friend. UpdateContext({varRecord: First(Gallery1.AllItems)}) on your cancel/view actions. 🤩
@ cheers buddy
Love your videos. I was wondering why you dont set the gallery default to {} and add a reset Gallery command to the new and unselect button. Is there a specific reason?
Nope, I have never tried that way. Interesting. I still enjoy my variable control and using it across multiple screens but I will try your way next time and give it a look. Thanks
Hi Shane. Love your videos. I am new to PowerApps and working on implementing a lot of your suggestions in my first couple of apps. This one is great and has helped a lot. I am confused with a delete button. I have this function on my Delete button. After the record is deleted, the form still shows the remnants of the deleted record. How do I fix this?
UpdateContext(
{
deleteMode: true,
deleteCancelled: false,
selectedRecord: RecordsGallery1.Selected
}
)
I have tried changing RecordsGallery1.Selected to varRecord and it still seems to delete the record but still has the remnants of the deleted record.
Another key solution. Thanks!
You bet!
Hi, Thanks four your great videos, Shane. I want to point out that in a scenario, where you e.g. have buttons to perhaps trigger a workflow which is updating the items in the SharePoint List directly I might need to call Refresh(list) to update the data. Then your approach does not work because the locRecord variable does not update to the new data. I cannot find any hook where to update that. If you manually switch items then everything is okay, but that is not what I want to see. If the user clicks the button, the workflow runs successfully I want the user to immediately see the updated data.
Any Ideas to that?
After you do the Refresh then Set(varRecord, Lookup(datasource, ID = varRecord.ID)) this will get the refreshed version of the record in your variable.
Would you recommend to use a Gallery Control inside a Component? If so, would this make things easier with dynamically retrieving fields?
It depends on the scenario. If a gallery is going to be reused exactly the same then yes a component makes sense. But if each one is unuqie then it would be more trouble than it was worth.
@@ShanesCows Thanks for your perspective!
Well done, thanks Shane. "IsSelected", pulled out a lot of hair on that one.
Glad this helped. Got to save that hair, as we get older it falls out enough on its own. 🤣
Excellent method 👏🏻👏🏻👏🏻
Thank you! 🙂 It makes Power Apps a lot easier when you control everything. 🙂
Thank you Shane
Thanks. Have a great day.
Great Shane thanks
You are welcome, have a great weekend.
Good points Shane! Nice!
Thanks Andrew! Have a good week dude.
By the way, what's up with those "extra rectangle things" that they add in to gallery templates? Do they serve some special purpose, or have some kind of different functionality? Do I lose anything by deleting them?
They are just visual markers. You can delete them with no ill effects.
If I have multiple gallery's do I just name them different variables, but it will work the same or is this one use only?
Yes. I have plenty of varRecord2 in the world. The more the merrier 🤣
Just when I thought I had 1% of Power Apps under control...
At least .9%? 🤩 Keep working, so much cool stuff to learn.
Using the selected gallery can cause issues with resetting controls. Just doesnt seem to work with some apps. Variables are the way.
Agree Tom. More control is always better. 🤩
When I try adding the UpdateContext code to the OnSelect event on a gallery it does not store the record in the varRecord variable. I followed the tutorial to the letter. Any idea why this might be happening? Is there a app level setting I need to enable?
It seems I was using a "Vertical gallery" component instead of a "Blank vertical gallery" component. Not sure why the former doesn't work with this method, but switching it solved the problem. If anyone knows the point of using a "Vertical gallery", I'm all ears.
That is really weird. I don't know why the first wouldn't have worked 🥲
What is the formula for Edit Record?
No change. :)
Game changer once again
Thanks 😊
I encountered a problem. When clicking on the gallery, the selection will not trigger the template fill when you click on components in the layout template, im using blank layout gallery and adds components on it. But when you click on the layout template outside those text box , image, The selection template fill color is okay .
Set the Gallery OnSelect property to be Set(varRecord, ThisItem)
Already did that.. idk the reason. What i did was that i put a container behind all components in the template of the gallery list
I am little confused regarding title of this video, title should be "Don't use PowerApps Gallery ISSelected Item" or "Don't use PowerApps Gallery Selected Item"? because you are still using gallery.selected to show selected item from gallery to form if I am getting you correctly.
No, the Item property of your Form should be varRecord when you switch everything over. 🤩
@@ShanesCows I missed that :) thanks