cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Selecting next item in a gallery after submitting Edit Form

I have an app where one user will fill in data and submit it. His manager should review the quality of the data and check that it has been done and then approve it. 

To manage this list of approvals I have a gallery connected to sharepoint, with a filter. The filter checks for items in sharepoint list with value "Not Approved".  I display the values using an edit form.  When the manager selects the item they can view the details and then approve the entry. Approving the entry places their user name instead of Not Approved, which removes the entry from the gallery. 
After submission if there are still items in the list I would like the gallery to automatically select the next item in the list and the edit form to display it. Currently it simply displays a blank field until I select the next item from the Gallery. 

 

Thank you for any advice. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@ErikParmlind 

Was your issue solved?  If yes, please close the thread.

 

It sounds like you decided only to use this portion of the code I supplied.

First(Gallery1.AllItems)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
Super User III
Super User III

@ErikParmlind 

Please try this code in the Item property of your Edit Form.  My idea was to check whether there was any Gallery selection using IF + ISEMPTY.  When there is no gallery selection the 1st item in the gallery is shown.

 

If(!IsEmpty(Gallery1.Selected),Gallery1.Selected,First(Gallery1.AllItems))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Hello MrDevaney, 

 

I have given that a try but it seems to be the same as before. But then when I tried First(Gallery1.AllItems) everything seems to work. 
Thank you for your help, 

Erik 

@ErikParmlind 

Was your issue solved?  If yes, please close the thread.

 

It sounds like you decided only to use this portion of the code I supplied.

First(Gallery1.AllItems)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "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 (7,130)