I was wondering if it is possible to accomplish the following:
I would like to auto-number 'Like' items 1,2,3 etc.
By like I mean all the entries for the same name.
I have an app for issuing detentions to students. I would like to display in the gallery a number on each detention issued. The number would be unique based on the students name.
For example based on created date:
This would actually display as:
The third for tommy would issue an afternoon via flow than the 1 or 2 etc.
The reason for this is that every third (3,6,9,12) etc I need to generate an email through flow to issue an afternoon or saturday detention rather than a week time lunch detention.
Any suggestions would be appreciated.
Hi @Newbie2019 ,
Do you want to generate auto-number based on type in PowerApps?
I'm afraid it's not supported to make it currently in PowerApps.
For now, we only have CountRows/CountIf function to count the row number meet the requirements. But automatic number
according to order is not supported.
I suggest you express your views about adding this function on PowerApps Ideas Forum. Your precious feedback will be very helpful for our work.
If you create a number field in the datasource, and then have any new items in the form do something like:
CountRows(Filter(datasource, name=studentname)) +1
Then it should give you a '1' if there's no existing rows with that name, or a count of the rows+1 which should give you what you want - could you try incorporate that into your App and let me know how you progress?
Thank you for your suggestion. I created a new 'number' column in my sharepoint list (MIMS) called Count.
Your formula would therefore be:
CountRows(Filter(MIMS, Count=Student)) + 1
Stupid question, do I place this within a data card in the edit screen or add it to my gallery as a simple label?
Confused about adding it to the app.
Any additonal steps would be appreciated.
Autonumber isn't the function you are looking for to do this. Autonumber creates sequential numbers for records as they are created.
What it looks like you want to do is return a count for the number of records submitted against a student. You could use a CountRows function and use the student name from the name column to fine the number of applicable rows.
We are using CountRows to count the number of existing rows where Name (the column) contains "James Fern" for example, and then adding one to that, so you would set the value of the text input/label in the new columnsto the formula suggested.
Using count="Student Name" would not work, as that is looking for the name "Student Name" within the column Count, which there should be none as you have no data in that column yet.
What we want to do is get the number of existing rows where "Student Name" is within the column called Name.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand