cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

OnSuccess event

Howdy all.

 

*** New Update***

I seem to be encountering now an issue that sometimes the OnSucess which is set to ViewForm(EditForm1)  does work or sometimes it doesnt.

 

I will report again if something changes!

******

 

Is there a way that after a successful submission of an Editable Form, that Form goes into View mode but displaying the record that was just edited or created?

 

So far I've seen in examples are set so that OnSuccess takes them back to the previous main gallery page.  But I'd like to give users one last chance to verify that their entry is correct before they navigate out.

 

I'm just starting to play with PowerApps and still figuring things out.   Any thoughts?  Thanks a lot!

Lou

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Ok, came up with a workaround based on eka's ideas and also by what was suggested by v-xida on another thread.

 

Basically ended up creating a variable to keep track of the last submission and then using that as part Form.LastSubmit as the items to display.   But in my case there was also some other If functions to ensure they saw the right screen as they browsed.

 

With this I was able to keep a single form.

 

Also, Carlos' tips helped with simplicity: https://docs.microsoft.com/en-us/archive/blogs/carlosfigueira/decouplingbrowsegalleryfromforms

 

Thank you!

Lou

View solution in original post

3 REPLIES 3
eka24
Super User
Super User

On your SubmitForm Button Add ViewForm. Example

   SubmitFor(Form1); ViewForm(Form1)

 

OR

You can Insert another, form2 and on its Items property of the Form2 put:
 LastSubmit.Form1

Make sure the default mode of the form2 is view

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Anonymous
Not applicable

Thank you eka.

 

From what I'm seeing, the challenge seems to be when I'm creating a new item.  Typically it will go display in viewmode whatever was the last gallery selection.

 

Seems to be that I'd need to reference the new item to display in view mode?

 

All thoughts are appreciated.  I'll keep the additional form idea in mind... but don't want to be creating screens unless necessary.

Thanks!

Lou

Anonymous
Not applicable

Ok, came up with a workaround based on eka's ideas and also by what was suggested by v-xida on another thread.

 

Basically ended up creating a variable to keep track of the last submission and then using that as part Form.LastSubmit as the items to display.   But in my case there was also some other If functions to ensure they saw the right screen as they browsed.

 

With this I was able to keep a single form.

 

Also, Carlos' tips helped with simplicity: https://docs.microsoft.com/en-us/archive/blogs/carlosfigueira/decouplingbrowsegalleryfromforms

 

Thank you!

Lou

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,790)