cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Teaa
Level: Powered On

Ticket ID

I'm currently creating an app that will be used to create and view job tickets. 

 

Each ticket needs it's own unique identifier, I was hoping to make it FM-00000 with each one being a sequential number but I can't see how to do this.

 

Can anyone advise?

 

Many Thanks

3 REPLIES 3
bean
Level 8

Re: Ticket ID

If you are storing these tickets in a database; when submitting a new ticket, you could possibly get the max value from the database and perhaps +1 to that. However, as FM-00000 would be a string, you might have to try split it by - and get the right side of it, to add a 1 to it.

 

For a more simple approach, you could just have a column for Type which could be FM or AM or w/e and another column called Ticket_Id which is just a number. This way you can get the max number easily and also add to it easily. 

 

Hope this gives you more of an idea on how you might want to tackle this problem.

 

Sean

Community Support Team
Community Support Team

Re: Ticket ID

Hi @Teaa,

 

Well, that will depend on which data source you would like to use.

For example, if here we use SQL Server as the data source, then we could enable an auto-generated ID (Primary Key) field, then under PowerApps, use Concatenate function to combine the string with the number autogenerated, to show it in PowerApps:

Concatenate("FM-", text(SQLField))

Things to note is, the auto-generated field under the data source side can't be updated or created under PowerApps.

There is another thread for your reference, for methods to generate GUID:

Create a GUID

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Teaa
Level: Powered On

Re: Ticket ID

Sorry should have added, the data source I'm using is Excel via OneDrive. 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 423 members 5,871 guests
Please welcome our newest community members: