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

When I click create a new ticket in the Service Desk app that I am customizing, duplicate tickets are generated with the information split across both

So as i was saying, theres nothing that pops up to me as being obviously wrong.  I am customizing the service desk template and turning it into a tool to track downtime via creating downtime tickets. Issue is that when i fill out one ticket and click submit.  When i go to the dashboard, it shows 2 tickets generated for every 1 ticket submitted.  Screenshots below. Any direction would be great. I only need one ticket generated for each click.

 

This is create ticket formula:

If(IsBlank(Subject.Text) || IsBlank(Description.Text) ,UpdateContext({msg_visible:true}),SubmitForm(NewTicketForm);UpdateContext({New:Patch(Downtime,LookUp(Downtime,ID=Text(Max(Downtime,ID))),{Subject:Subject.Text,Description:Description.Text})}))

 

 

See in the screenshot below the count is 18 prior to submission

USe this one.png

 

Post submission count is 20 - Ticket is missing Subject and Description and the duplciate ticket is not visible.

Use this one 2.png

 

This is how its being saved in the SP list... Subject and Description on new line item.

Datadude55_0-1600316878477.png

 

This is form the formula is referring to

use this.png

  

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that you create two items by using the formula that you provided?

The reason why you met this problem is that:
data in daracards will be invalid after the form being submitted.

Since you submit the form before you patch, so data like "Subject.Text" is valid, which related to creating another item.

Try to use this formula:

If(IsBlank(Subject.Text) || IsBlank(Description.Text) ,
   UpdateContext({msg_visible:true}),
Set(varsub,Subject.Text);Set(vardes,Description.Text);SubmitForm(NewTicketForm);
UpdateContext({New:Patch(Downtime,Last(Downtime),{Subject:varsub,Description:vardes})})
)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that you create two items by using the formula that you provided?

The reason why you met this problem is that:
data in daracards will be invalid after the form being submitted.

Since you submit the form before you patch, so data like "Subject.Text" is valid, which related to creating another item.

Try to use this formula:

If(IsBlank(Subject.Text) || IsBlank(Description.Text) ,
   UpdateContext({msg_visible:true}),
Set(varsub,Subject.Text);Set(vardes,Description.Text);SubmitForm(NewTicketForm);
UpdateContext({New:Patch(Downtime,Last(Downtime),{Subject:varsub,Description:vardes})})
)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,306)