cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Ticket Number on Create ticket screen

Hi

 

I have approximately 40 tickets in my App - however when i create a new ticket, its always at 1 or 2. Please see below.

I would like the new ticket number to carry on with 41, 42, 43 etc.

 

Thank you

 

Ticket number.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Ticket Number on Create ticket screen

Hi @JerryH :

Do you want the ticketID of each record to be incremented by 1?

Could you tell me what 'Ticket Id''s date type is?Text or number?

Case1:'Ticket Id''s data type is number.

please try this code:

 

Last(Sort('TICKED List','TICKED ID',Ascending)).'TICKED ID'+1 /*'TICKED List' is the list of your tickets*/

 

Case2'Ticket Id''s data type is text

 

Value(Last(Sort('TICKED List','TICKED ID',Ascending)).'TICKED ID')+1 /*'TICKED List' is the list of your tickets*/

 

Best Regards,

Bof

 

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User II
Dual Super User II

Re: Ticket Number on Create ticket screen

Try using the CountRows() function instead of a variable, NumberOfTickets, inside the app.  The variable will reset each time your reload the app.  CountRows() will get you the current total number of items in the data source.  The only problem with CountRows is that it isn't delegable so it will cease to be effective if your datasource gets bigger than then DataRow Limit (500 by default with 2,000 as the max).  The only other alternative is to store the maximum ticket number somewhere outside the app and retrieve it whenever the app is started and update it whenever a new ticket is created.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Microsoft
Microsoft

Re: Ticket Number on Create ticket screen

Hi @JerryH :

Do you want the ticketID of each record to be incremented by 1?

Could you tell me what 'Ticket Id''s date type is?Text or number?

Case1:'Ticket Id''s data type is number.

please try this code:

 

Last(Sort('TICKED List','TICKED ID',Ascending)).'TICKED ID'+1 /*'TICKED List' is the list of your tickets*/

 

Case2'Ticket Id''s data type is text

 

Value(Last(Sort('TICKED List','TICKED ID',Ascending)).'TICKED ID')+1 /*'TICKED List' is the list of your tickets*/

 

Best Regards,

Bof

 

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,404)