Hi All,
I need to implement auto sequence number with 4 digits of button onselect on powerapps screen which i need to patch in dataverse table. This sequence number should be maintained for all users. Can someone help suggest me on this criteria.
Thanks in advance
Solved! Go to Solution.
Hi @BHR ,
Try below formula to get the incremented value.
Set(varAutonum,Sum(Value(First(SortByColumns(DataSourceName,"YourIDColumnName",Descending)).YourIDColumnName),1))
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @BHR ,
In dataverse there is autonumber field which can be 4 digit and auto incrementing. Are you referring to this or you want something else ?
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @PG_WorXz10 ,
Thanks for helping me.
I want to generate autonumber on powerapps screen itself on button click.
For ex: I have a new form which is opened by clicking on add icon when we click on add icon we need to generate autonumber which we need to show on form text input.
Hello @BHR
For this you need to maintain a column in dataverse and in power apps you can use function to get that value and add 1 there and set that in a variable to show it like: Set(variableName,Value(Last(databaseName).ColumnName +1));
Try with this hope this will work for you.
Hey @BHR if you want to use autoincrement number you can refer to this formula:-
set(variable name ,value(Last(database name).'Column name '+1)).
it will automatically increase last id with one but in the initial you need to give a value so that from next time it can automatically calculate values.
Hi @BHR ,
Just want to be sure before I suggest any formula to calculate auto number.
In case two are three users open the form same time click on add the Autonumber which uses Dataverse unique ID will be same for those three users considering it will require time to submit those data into Dataverse after adding all the required fields.
I would suggest its always better to show the autonumber after the data is patched which will make it unique for all the users otherwise there are slight chances of creating same unique number for multiple users.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @Vikas_Sharma ,
Thanks for helping me.
i have created dataverse column in table and which is starting with 1000. i used the Concatenate(varName,"-",Text(varAutonum)). but it was not taking latest number while patching.
it was showing like AAA-1.
Please help me.
Hi @BHR ,
Try below formula to get the incremented value.
Set(varAutonum,Sum(Value(First(SortByColumns(DataSourceName,"YourIDColumnName",Descending)).YourIDColumnName),1))
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @BHR
First Check, what value you are getting in your varAutonum variable.
If you are fetching value from table for varAutonum variable then use Text(Last(databaseName).ColumnName);
Try with this hope this will work for you.
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 |
---|---|
193 | |
68 | |
48 | |
42 | |
20 |
User | Count |
---|---|
252 | |
122 | |
83 | |
76 | |
69 |