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

Not being able to submit a ticket

I am using a ticket system based on a form. Whenever I try to submit a ticket, I get an error trying to submit it. Here is the error:

https://gyazo.com/4f4cf58900367cb4ee4e622a4d050dff

I do not have any errors inside of my applications and I have refreshed all the data sources and it still does not work. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Not being able to submit a ticket

OK @TimoMigchielsen ,

Understand unless you tell me your logic, I can only deal with the code and try to interpret intention. How would this work

If(
   CountRows(
      Filter(
         MancoTabel, 
         Value('Ticket ID')=Value(DataCardValue24.Text)
      )
   ) > 0
   ,
   SubmitForm(EditForm);
   Navigate(Overzicht,None),
   SubmitForm(EditForm)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

11 REPLIES 11
Highlighted
Community Champion
Community Champion

Re: Not being able to submit a ticket

Hi @TimoMigchielsen ,

As noted, I am on the other side of the world to you - I will tag my very capable colleague @mdevaney who is behind your time zone and should certainly be able to help.

NOTE: It follows on from this post

Highlighted
Post Prodigy
Post Prodigy

Re: Not being able to submit a ticket

Guess he has no time to help me or has not seen the @  

Are you able to help me? @WarrenBelz 

Highlighted
Community Champion
Community Champion

Re: Not being able to submit a ticket

Ok I give me a few hours. Not home right now

Highlighted
Community Champion
Community Champion

Re: Not being able to submit a ticket

Ok @TimoMigchielsen ,

So I can look at it shortly, please send the code (in text) you use to update the data source.

Highlighted
Post Prodigy
Post Prodigy

Re: Not being able to submit a ticket

Alright, I have a icon that I have to click on to send the ticket. The onselect code of this icon is the following:

If(CountRows(Filter(MancoTabel, Value('Ticket ID')=Value(DataCardValue24.Text))) > 0,Navigate(Overzicht,None),SubmitForm([@EditForm]));
If(CountRows(Filter(MancoTabel, Value('Ticket ID')=Value(DataCardValue24.Text))) > 0,SubmitForm(EditForm),SubmitForm([@EditForm]))


This basically checks if the ticket id is already in a column, if it is, it will navigate to overzicht and submit the form. When the ticket id is new, it will just submit the form and stay on that screen. 

Then on the success of the editform i have this code:

Set(ResetValue, ""); NewForm(EditForm);

ResetValue is to set the values to nothing after submitting. It then creates a new form.

@WarrenBelz 

Highlighted
Community Champion
Community Champion

Re: Not being able to submit a ticket

OK @TimoMigchielsen ,

I am a little confused with your code.

You have two completely separate If statements based on the same argument - that the number of tickets matching the value in DataCardValue24 are either greater than zero or not.

The first one 

  • Greater than zero navigates to Overzicht
  • If zero submits EditForm

The second one

  • Greater than zero submits EditForm
  • If zero submits [@EditForm]
If(
   CountRows(
      Filter(
         MancoTabel, 
         Value('Ticket ID')=Value(DataCardValue24.Text)
      )
   ) > 0
   ,
   Navigate(Overzicht,None),
   SubmitForm([@EditForm])
);
If(
   CountRows(
      Filter(
         MancoTabel, 
         Value('Ticket ID')=Value(DataCardValue24.Text)
      )
   ) > 0,
   SubmitForm(EditForm),
   SubmitForm([@EditForm])
)

So no matter what happens, EditForm will be submitted and what is the difference in [@EditForm]?

 

 

Highlighted
Post Prodigy
Post Prodigy

Re: Not being able to submit a ticket

I understand what you mean and I just see it is indeed the same if statement. 

Basically what it is supposed to do is check if the ticket ID is already inside of a column (Mancotabel -> ticketid). 

If the ticket is already in the column, I want it to navigate to overzicht and submit the form.

If the ticket does not have the ticked id in the column, I only want it to submit the form. Somehow this works already. I get no error editing it, but trying to make a new ticket I get the error.



@WarrenBelz 

Highlighted
Community Champion
Community Champion

Re: Not being able to submit a ticket

Ok @TimoMigchielsen You only need the first half of the code.

 

If(
   CountRows(
      Filter(
         MancoTabel, 
         Value('Ticket ID')=Value(DataCardValue24.Text)
      )
   ) > 0
   ,
   Navigate(Overzicht,None),
   SubmitForm(EditForm)
)

 

The problem with a new ticket not submitted is that the data is not yet in the list

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Post Prodigy
Post Prodigy

Re: Not being able to submit a ticket

Now if the if statement is true, it will only navigate me and not submit it, right?

And when the if statement is not true, it will submit the form?

Cause I also need it to submit it when the if statement is true.

@WarrenBelz 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,459)