cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

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

Hi @Anonymous,

 

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

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
v-monli-msft
Community Support
Community Support

Hi @Anonymous,

 

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.
Anonymous
Not applicable

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?

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

Hi @Anonymous,

 

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.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,111)