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 / How do we add year dro...
Power Apps
Answered

How do we add year dropdown in model driven app

(0) ShareShare
ReportReport
Posted on by 2

Hi All,

It would be great if someone helps me

 

How do we add the year cascading dropdown where customer can select the year accordingly in model driven app? i created the table and year is a single text data?

 

Please help.

 

Thanks,

Asha 

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Not 100% sure if it works exact same in a model driven as it does in canvas, but you can try making some variation of this as your dropdown items property.

    ForAll(Sequence(100, 0, 1) As yearStep, Year(DateAdd(Today(),-50,Years))+yearStep.Value)

     

    this way your table doesnt need constant updating, and it will just always show you a 50 year spread of years on either side of today's date. Obviously you can change that spread by changing the math in the formula but thats an example

  • Priyanka03 Profile Picture
    2 on at

    Thank you for response. But i'm not able to see the item property which we can enter the formula.

  • Priyanka03 Profile Picture
    2 on at

    I tried to enter this formula in year and i got this error

    Priyanka03_0-1677870236558.png

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    @timl  do you have much experience with model driven? ForAll, I thought, was available to it. I don't have model driven open in my current environment so would have to jump through some hoops to run a test.

  • Verified answer
    timl Profile Picture
    36,815 Super User 2026 Season 1 on at

    Thanks for tagging me @TheRobRush

     

    @Priyanka03 - Model driven apps are not as customisable as canvas apps so this is not straightforward.

    I can think of 3 ways to address this:

    1. Add a page to your model driven app. You can then use the canvas controls and specifically, the formula that @TheRobRush  posted.

    2. Build a PCF control. As an example, the one below works for date fields. In your case where you added a text field, you'd need to find/build one that works for text fields.  

    https://pcf.gallery/year-picker/

    3. Add a separate year table and add entries for all the years you want to show in your dropdown. You can then add a relationship between the year table and your target table. Any form you now create will render the year as a dropdown by default.

    The comment I'd make is that you may be aware of the common/irritating issue where MDAs format year numbers with commas - this possibly explains why you added year as single text.

    https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Deactivate-or-Remove-Separator-in-Whole-Number/td-p/662585

    If you choose option 3 from above, I'd create 2 columns - YearNumber and YearText, both with the same values. If at some future point you need the numeric value (eg for arithmetic purposes, looking up records greater than/less than the year value), you'll easily have that at hand.

  • Priyanka03 Profile Picture
    2 on at

    Thank you for you help:) TheRobRush and timl

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 617

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard