cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Form edited after submitting it

Hello!

So basically I am having a ticket application where people can submit a ticket. 

This is how the ticketgallery looks like. Whenever you click on the + you go to another screen to submit a ticket.
https://gyazo.com/3331a1bf176da7dae1770923e434ef52

 
 
 

You then come in this screen:
https://gyazo.com/35b7cdb987891eee687059065982bab0

You can fill in all the information in there and then click on the check emoji. So I've made it so it doesn't do back() so you stay on the same screen. I then have set it so some datacards don't get cleared but do get sent in the Excel database. So basically some information would stay when you submit the ticket. If they want to submit another ticket some information will already be there. Now whenever they fill in this ticket with other information and submit it again, it will just edit the last ticket. How do I make it so it will be a new ticket after they submitted it?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Post Prodigy
Post Prodigy

Re: Form edited after submitting it

I fixed it myself and it ended up being an easy fix... all I had to do was put this: NewForm(EditForm1) at the onsuccess value of the form.

View solution in original post

8 REPLIES 8
Highlighted
Super User III
Super User III

Re: Form edited after submitting it

On the Assumption that the field contain a number, set a variable on success :
1. Set(NewTicket,Value(Datacarvalue5)+1)
2. Then Put the variable NewTicket on the default of the datacardvalue5
Highlighted
Post Prodigy
Post Prodigy

Re: Form edited after submitting it

Could you explain it better? I do not understand what you mean. Why are you doing +1 on the newticket value, will that be the TicketID?

Highlighted
Post Prodigy
Post Prodigy

Re: Form edited after submitting it

@eka24 

Highlighted
Super User III
Super User III

Re: Form edited after submitting it

In adding a new ticket, I am assuming that you will need a new ticket number. The + 1 is to increase the old number by one. Unless your ticket number should cannot be incremental
Highlighted
Super User III
Super User III

Re: Form edited after submitting it

Another Option is to create a collection which will retain the last successful submitted record
ClearCollect(LastSuccessRecord,YourForm.LastSubmit)

Then in any datacardvalue that you want the old record reflected put example:
LastSuccessRecord.TicketNumber
Highlighted
Post Prodigy
Post Prodigy

Re: Form edited after submitting it

Right now I have this as default on the "TicketID"

If(EditForm1.Mode=FormMode.New, Last(MancoTabel).'Ticket ID'+1, 'Ticket ID')

I guess I just need to make it so the formmode will be "new" after I submitted the ticket

@eka24 

Highlighted
Post Prodigy
Post Prodigy

Re: Form edited after submitting it

I fixed it myself and it ended up being an easy fix... all I had to do was put this: NewForm(EditForm1) at the onsuccess value of the form.

View solution in original post

Highlighted
Super User III
Super User III

Re: Form edited after submitting it

If Last function worked for you without any delegation issues, that's good.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,287)