web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Generating number sequ...
Power Apps
Answered

Generating number sequence based on condition

(0) ShareShare
ReportReport
Posted on by 9

Hi,

I'm new to powerapps and looking for assistance to create a sequential number based on inputs of two dropdown lists. Based on the two dropdown lists inputs I would like for it to create the next sequential "Serial Number". See example below, for instance if I were to select "SUBS" and "2.50 INCH" then it would create "Serial Number" 4 next. Any help is appreciated!

 

Jtrahan_1-1681152257813.png 

Jtrahan_2-1681152354441.png

 

 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,577 Super User 2026 Season 1 on at

    Hi @Jtrahan ,

     

    Try setting the Default property of the control to:

    LookUp(
     ExcelTableName,
     Description = drdDescription.Selected.Value && 'Component Type' = drdComponentType.Selected.Value
    ).'Serial Number'

     

    You will have to replace some of the names in there to what you are actually using (ExcelTableName, drdDescription and drdComponentType).

  • Jtrahan Profile Picture
    9 on at

    Thanks @BCBuizer,

    I'm receiving two errors when I try this, "incompatible types for comparison. Text,control" and also "expected enum value"

     

    Jtrahan_0-1681164163374.png

     

  • Verified answer
    BCBuizer Profile Picture
    22,577 Super User 2026 Season 1 on at

    Hi @Jtrahan ,

     

    The first issue is that you are trying to set the wrong property/control. I can see from the screenshot you are trying to set the DefaultMode property which is a property of a Form control only. This property defines which mode the form is in by default which determines its' behaviour.

     

    The formula I provided is to be used on the Default property of the text input control in the 'Serial Number' datacard. However, after having re-read your original question, I see the formula should be:

    Last(
    	Filter(
    		DATA,
    		Description = 'DD Component Description'.Selected.Value && 'Component Type' = 'DD Component Type'.Selected.Value
    	)
    ).'Serial Number'+1

     

  • Jtrahan Profile Picture
    9 on at

    Thank you!! It works!

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard