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 / Data type for a Year f...
Power Apps
Unanswered

Data type for a Year field

(1) ShareShare
ReportReport
Posted on by 140

I'm working with annual reports, so I have multiple tables where one of the fields needs to say for what year this report is for. I'm not sure what data type is best for this.

 

  • Date and time, date only, where I would ignore the date, so they are all maybe January 1st.
  • Number, because that is what they are, but we are not calculating with them and I don't want them represented with comma format
  • Text, I'm leaning towards this but now I have to ensure that only a valid year is entered in the forms.

 

How would you handle this?

I have the same question (0)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @ingovals ,

     

    Most of the time I have done this I end up utilizing 1 of 2 options:

    1. Option Set - I add all the years possible and this makes sure I get a valid selection...
    2. Text - I use this because of the issue with the display of the "," which is annoying in the Number 😀.  You could create a javascript function to help validate the entry of the text data on the form.

    I do see that someone created a web resource to remove the comma as well on the UI if you do utilize a number field.

    https://vjcity.blogspot.com/2020/10/remove-comma-from-number-fields-in.html

     

  • Joe_Laz Profile Picture
    18 on at

    Reading through your post, I feel that there is a limited amount of reporting years to choose from, and you know which years you want your users to input. Therefore, I would use a choice column and put only valid reporting years into the choice box.

     

    I put a screenshot below of a relatable experience. It shows how I used a choice column to control the record of Employee's start times. Employees are only allowed to record time in 15 min increments, and I've input all the allowable start times. Employees get to select from a dropdown box their start time.

     

    I hope that helps. 

     

    Best of luck,

    Joe

     

    Joe_Laz_0-1653666955925.png

     

  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    In the past have used a Lookup.  And on the list of values had a Text (name field) value and Number field, the number is there just in case you decide you want to add or subtract a year from the current value it can then be done without having to covert the text to a number to do the maths.

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 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard