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

How to move from one form submission to another form for the next item in gallery

Hi. How can I navigate from one form submission  on the edit form screen to a new edit form for the next gallery item? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Sage22 ,

 

If you use sharepoint list, you could use ID column to achieve this requirement.

If you use other data sources, you could create a column similar to ID column in list.

 

I take sharepoint list as an example:

1\ This is my list 'LIST122'.

v-xiaochen-msft_0-1620957346253.png

 

2\ Add a gallery control and set its Items property to:

LIST122

 

Set the gallery control 's onselect property to:

Set(Thevar,ThisItem)

 

3\ Add an edit form control and set its DataSource property to:

LIST122

 

Set its Item property to:

Thevar

 

Set its OnSuccess property to:

Set(Thevar,First(SortByColumns(Filter(LIST122,ID>Thevar.ID),"ID",Ascending)))

 

4\ The result is as follows:

AAA.gif

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

View solution in original post

10 REPLIES 10
v-xiaochen-msft
Community Support
Community Support

Hi @Sage22 ,

 

If you use sharepoint list, you could use ID column to achieve this requirement.

If you use other data sources, you could create a column similar to ID column in list.

 

I take sharepoint list as an example:

1\ This is my list 'LIST122'.

v-xiaochen-msft_0-1620957346253.png

 

2\ Add a gallery control and set its Items property to:

LIST122

 

Set the gallery control 's onselect property to:

Set(Thevar,ThisItem)

 

3\ Add an edit form control and set its DataSource property to:

LIST122

 

Set its Item property to:

Thevar

 

Set its OnSuccess property to:

Set(Thevar,First(SortByColumns(Filter(LIST122,ID>Thevar.ID),"ID",Ascending)))

 

4\ The result is as follows:

AAA.gif

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

View solution in original post

Hi @v-xiaochen-msft 
What is the onSelect property of the Check icon set to? The code for the On Success property is giving an error with the ID. Should the greater than sign (>) be an equal (=)?

v-xiaochen-msft
Community Support
Community Support

Hi @Sage22 ,

 

Please use pictures to explain the problem you encountered.

 

Best Regards,

Wearsky

Sage22_0-1620977165890.png

Hi @v-xiaochen-msft ,
I recreated something similar to show the error I am getting. So I set the OnSuccess property of the edit form to what's in the picture. My check icon is set to submitform(form1) for the onSelect property. the Gallery gets updated when I check but the form doesn't show me the next item in the Gallery. 

v-xiaochen-msft
Community Support
Community Support

Hi @Sage22 ,

 

1\ What's the error message? 

2\ What's your datasourse? Is it a sharepoint list?

3\ What's the data type of your ID column? Is it a number column?

4\ What's 'Var1'? 

 

Best Regards,
Wearsky

@v-xiaochen-msft 

1/ It was a data format error message,expecting an integer. My ID column data type was set to General. I changed it to numerical and the error is gone. 
2/ I'm am using an excel file stored in a Googledrive 
3/ It was General so changed it to numeric
4/Var1 is the variable I set for the gallery onselect property. Set(Var1,ThisItem)

 

@v-xiaochen-msft 
The problem I have now is when I click check to submit the form, the edit form isn't updated with the next row item. 

v-xiaochen-msft
Community Support
Community Support

Hi @Sage22 ,

 

Why did you create two variables? (Var1, Thevar)

In my example, I create one varibale 'Thevar'.

And set its to the Item property of edit form.

 

So, could you privide the formula of you Item property of form?

 

Best Regards,

Wearsky

I think it is working now. My variable was Var1. Made the correction and it now works. 
Thanks @v-xiaochen-msft 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,089)