Notifications
Announcements
Here we required to generate an invoice number automatically, when ever a user open an App. in the invoice field(TEXT INPUT). The invoice number automatically generate. for example number starts with 0001. In the TEXT INPUT, When ever user opens an app. 0001 has to fetch to the invoice text input. and then it goes on increase for next time. it should be 0002 in the invoice INPUT TEXT.
Hi,
There a re a couple of things you can do:
- generate a guid. In a label use GUID();
- If you datasource allows, you can have a Autonumber (Dataverse); AUTO_INCREMENT for SQL (SQL AUTO INCREMENT a Field (w3schools.com) );
- Also, you can look at your datasource, find the last number and add 1. Here's one way of achieving it: First(SortByColumns(Accounts, "accountnumber", Descending)).'Account Number' + 1 (please adapt)
Regards
This will work too:
Index(SortByColumns(Accounts, "accountnumber", Descending), 1).'Account Number' + 1
Maybe someone can elaborate on the merits of Index over First?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 739 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 268