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

Autogenerating case id

Hi,

 

I am creating an app where cases are logged and tracked to closure. 

The app reads from and writes to a sharepoint list. 

I need that when a new case is submitted, a case id is generated. For example, a case related to IT would be IT-00001. The next one would be IT-00002. For Admin, it would be AD-00001,AD-00002 and so on. 

If that is difficult to implement, I could do with simple, common serial numbers for all , like 1, 2,3, 4 etc.

 

Can someone point me towards a solution please?

 

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Autogenerating case id

I did something similar to what you are thinking about with Excel. Take a look and see if that gives you some ideas. PowerApps Excel AutoIncrement

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

Highlighted
Community Support Team
Community Support Team

Re: Autogenerating case id

Hi @AJ13,

 

I assume that you are trying to add a column which values are combined from Department/Region/ID these 3 columns automatically.

 

If this is the situation, then you could add this column as a text column, then in the edit form, set the Visible property of this data card to false, and then set the Update property of it to:

Concatenate(DataCardValue1.Selected.Value,"/",DataCardValue2.Selected.Value,"/",DataCardValue3.Text)

DataCardValue1 and DataCardValue2 are the dropdown controls for Department and Region choice columns. DataCardValue3 is the ID column you added in EditForm.

 

After this, your users do not need to edit this column, and it will update according to Department/Region/ID while submitting the form. 

 

Regards,

Mona

 

Community Support Team _ Mona Li
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

5 REPLIES 5
Super User
Super User

Re: Autogenerating case id

SharePoint has an ID column built in so that is already covered for you.

 

You could create a column in your SharePoint list and then set it with the ID you want. 

 

Have a dropdown where the user chooses IT or AD. Then set the column to be Dropdown.selection.value & ID. 

 

 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
Community Support Team
Community Support Team

Re: Autogenerating case id

Hi @AJ13,

 

Like @Shanescows suggested, acutally by default when you creating items in SharePoint list, an ID field is already created automatically by SharePoint in the background and the value is 1,2,3,4 etc. You can directly use this field in PowerApps. In EditForm, if you add this field, you will see that it is actually not editable:
捕获.JPG

 

Regards,

Mona

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

Re: Autogenerating case id

So if I am creating a new record from Powerapps, the ID will be generated only when the record is submitted. If I am to create a column with a case number in the format Department/Region/ID, is there a way this column can automatically be polulated from the ID field at the time of Submit?

Super User
Super User

Re: Autogenerating case id

I did something similar to what you are thinking about with Excel. Take a look and see if that gives you some ideas. PowerApps Excel AutoIncrement

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

Highlighted
Community Support Team
Community Support Team

Re: Autogenerating case id

Hi @AJ13,

 

I assume that you are trying to add a column which values are combined from Department/Region/ID these 3 columns automatically.

 

If this is the situation, then you could add this column as a text column, then in the edit form, set the Visible property of this data card to false, and then set the Update property of it to:

Concatenate(DataCardValue1.Selected.Value,"/",DataCardValue2.Selected.Value,"/",DataCardValue3.Text)

DataCardValue1 and DataCardValue2 are the dropdown controls for Department and Region choice columns. DataCardValue3 is the ID column you added in EditForm.

 

After this, your users do not need to edit this column, and it will update according to Department/Region/ID while submitting the form. 

 

Regards,

Mona

 

Community Support Team _ Mona Li
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

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,103)