cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TimoMigchielsen 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
TimoMigchielsen 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
eka24 Community Champion
Community Champion

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
TimoMigchielsen 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?

TimoMigchielsen Post Prodigy
Post Prodigy

Re: Form edited after submitting it

@eka24 

eka24 Community Champion
Community Champion

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
eka24 Community Champion
Community Champion

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
TimoMigchielsen 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 

TimoMigchielsen 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

eka24 Community Champion
Community Champion

Re: Form edited after submitting it

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

Helpful resources

Announcements
secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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!

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