cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErikParmlind
Frequent Visitor

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
Frequent Visitor

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,891)