cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErikParmlind
Level: Powered On

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
Super User
Super User

Re: Selecting next item in a gallery after submitting Edit Form

@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
Super User

Re: Selecting next item in a gallery after submitting Edit Form

@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."

ErikParmlind
Level: Powered On

Re: Selecting next item in a gallery after submitting Edit Form

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 

Super User
Super User

Re: Selecting next item in a gallery after submitting Edit Form

@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
thirdimage

Power Platform 24

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (4,853)