I would like to display the current year and the coming year dynamically as options in a drop down menu, the result is saved to a 'text' field i.e. NOT a date field.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Photo of Mark

Mark

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
An idea is to set up a separate table with the next 20 years of Years in both numeric and text format.   The text format could just  be a formula off the numeric field like ToText([Year numeric]).

 Then make a relationship to pull in a choice from that list to your record.  

But that would offer the user 20 choices.

So now make a Report to be used in the form properties for that drop down which would limit the choices to just the current and next year.  There are a variety of ways to do that filter, but one way is to make a  formula date field on the Years table called first day of year, with a formula, of Date([Year numeric], 1,1).

Then filter the report where that field is ANY of during the current year or during the next year.
Photo of Mark

Mark

  • 0 Points
Thanks Mark. I realize the effort required to create a table seems alot for what should be such a simple logical list (the logic doesn't exist within the drop down menu tool). What i have done is I have created a "multi-line text" drop-down and simply inserted the years as text from 2015 till 2020 on each line, this is not as clean as the the table you suggest but it is quicker and allows easier editing in the future.