cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

How to automatically select gallery items?

Hello,

 

I have gallery and form control on the screen, I display selected gallery item on the form.

 

There is also delete function, that deletes, selected gallery item, however after that, form does not show anything as none of the item is selected in the gallery.

 

How can I select gallery item after deleting the selected item?

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks @dave8 ,

Strangely I answered a post a couple of hours ago with delete code exactly yours and it did not work however, have you tried 

Refresh(SharePoint List Name)

however I now get your point. Of course the form will show nothing as the Item no longer exists.

I always refresh the list and navigate back to the gallery screen so the user can select another record.

This should show the updated gallery.

 

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.

 

View solution in original post

5 REPLIES 5
Super User III
Super User III

Hello @dave8 ,

What is the Items property of your gallery and what code are you using to delete the item?

Hi @WarrenBelz 

 

GalleryControl.Items == "SharePoint List Name"

 

RemoveButton.OnSelect == Remove("SharePoint List Name"GalleryControl.Selected)

 

Thanks and Regards,

Ok @dave8 ,

Try this on the delete

RemoveIf(
   "SharePoint List Name", 
   ID = GalleryControl.Selected.ID
)

 

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.

My issue is not regarding remove functionality, It already works as expected, however once the selected item is removed, there is no selected item in the gallery, and therefore form does not show anything without item is selected in the gallery.

 

How can I select an item into gallery automatically after Removing an item in the gallery?

 

Thanks,

Thanks @dave8 ,

Strangely I answered a post a couple of hours ago with delete code exactly yours and it did not work however, have you tried 

Refresh(SharePoint List Name)

however I now get your point. Of course the form will show nothing as the Item no longer exists.

I always refresh the list and navigate back to the gallery screen so the user can select another record.

This should show the updated gallery.

 

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.

 

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,322)