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

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
Anonymous
Not applicable

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
Super User
Super User

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
Anonymous
Not applicable

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?

Anonymous
Not applicable

@eka24 

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

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
Anonymous
Not applicable

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 

Anonymous
Not applicable

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.

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,590)