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
Post submission count is 20 - Ticket is missing Subject and Description and the duplciate ticket is not visible.
This is how its being saved in the SP list... Subject and Description on new line item.
This is form the formula is referring to
Solved! Go to Solution.
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,
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,
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
200 | |
69 | |
51 | |
49 | |
20 |
User | Count |
---|---|
261 | |
122 | |
85 | |
78 | |
72 |