cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErikParmlind
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
mdevaney
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
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (8,143)