Hi, I am quite new to PowerApps and have eventally got the majority of my form working, my form is created through MySql which seems to be causing me some issues.
However I have been asked to implement an autonumber function within my app, Is there anyway of being able to sent up a standard autonumber (e.g. 1,2,3,4,5 etc) for each new form?
It would be prefereable if I could even assign these in the backend mysql table and the user never seen these.
Any help would be greatly appreciated.
Thanks
Paula
Solved! Go to Solution.
Hi,
So the issue I have is that I am trying to insert a new record on a DB2 database. PowerApps is complaining that it cannot update the record ID field wich I suspect is an auto generate field. I tried your method without sucses.
Hello,
Trying to create this id field as well and i retrieve errors (though not in syntax). Is the proper schemas as follows:
Occurrence.First(List.Sort([field to autonumber], Order.Descending))
I am not sure of which ID schema to choose
Thanks
I ended up replacing the field with one that is not an auto generated one. I now use PoweApps to do the uneque insert of the value and not the DB. What I've realised is that one needs to have a very vanilar DB and then build your canvas app on top of that and let the app do the heavy lifting.
@KS772 wrote:Hello,
Trying to create this id field as well and i retrieve errors (though not in syntax). Is the proper schemas as follows:
Occurrence.First(List.Sort([field to autonumber], Order.Descending))
I am not sure of which ID schema to choose
Thanks
Hi,
I have an two Entities 1.Audit 2.Issue having 1 to N relationship,
For the Issue Entity- "Issue Name" is one Text field and "Issue Number" is the Auto number field,
So our requirement I want to display the Issue details with respect to selected Audit from the Audit Gallery in to Issue Gallery,
Now when ever you are trying to create Issue record, Issue Name field automatically filter the existing count of Issues of that Audit how many issues and for the new record Issue Name field increment by 1,
So for single user it is working fine,
The Problem is if the two users are creating records at same time the count is showing same for two records,
Suppose Audit having 10 issues, so for the new record Issue Name will be like Issue-11,so if the two users are creating the records at same time in the Issue gallery, issue name showing like Issue-11 for user 1 ,Issue-11 for user 2.
How can we display separate Issue Name for each record like how the Auto number will work.
Hi.
I am trying to use this same solution, but its not working in my case.
My column data type in sql is "int". The solution works if I change the data type to "nvarchar".
But, as this is a primary key in SQL, I wouldn't like to change the data type of this column.
How could I tweak this solution using First and Sort to make it work in my case.
Thanks in advance!
Sorry for posting this. I was wrong. It was giving me an error because the powerapps was not updating my changes on sql server instantaneously (change of data type). Once I saved and closed the app and opened it again, it worked! 🙂
Hi,
I have used this method and it is working. But when the user edits the item the number change automatically. This is what I don't want. My generated unique number should remain the same respective how many times the value gets updated. Can you please help me.
Regards
SAMALLICK9
Hi @samallick9
Use Coalesce(Parent.Default,First(Sort(datasource, ID, Descending)).ID+1 ). That way if there is a parent default (for example when the record is edited, it will use that but if it is new, then Parent.Default is blank and the next ID number will be inserted.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
261 | |
130 | |
86 | |
85 | |
69 |