cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dave8
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
WarrenBelz
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (68,127)