cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Auto add next highest number.

I have a sharepoint list that's used in an access database and a PowerApp. The Account number field is used throughout the access database. When a new Account is added to the PowerApp, I need it to auto-assign the next highest available Account Number. In access I would use: =Nz(DMax("CompanyNum","tblCompanies",""),0)+1

 

How would I do this in PowerApps? 

 

Table: tblCompanies_2

Field: CompanyNum

 

I've only been using PowerApps for a week or so - FYI - so far from savvy.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Auto add next highest number.

In PowerApps, the formula would be:

First(Sort(tblCompanies_2, CompanyNum, SortOrder.Descending)).CompanyNum + 1

View solution in original post

1 REPLY 1
Highlighted
Microsoft
Microsoft

Re: Auto add next highest number.

In PowerApps, the formula would be:

First(Sort(tblCompanies_2, CompanyNum, SortOrder.Descending)).CompanyNum + 1

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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