Forum Discussion

CBH_Service_Acc's avatar
CBH_Service_Acc
Qrew Member
17 hours ago

Text Field with Current Year

Hello,

I'm trying to create a text field called "Reporting Year" where users can only enter numerical values for a year (i.e., 2023). Also, I need the field to be auto-populated with the current year (i.e., 2025); if the users wants to change this, they can do so. 

I haven't been able to completely figure this out on my own, so I appreciate any help on this. Thanks in advance!

3 Replies

  • My suggestion is to keep this as a numeric field, and reconsider why you think you need to make it a text field. That way the native Quickbase behavior will ensure that only numbers are entered in the numeric field.

     

    then you can make a formula numeric field called [current year] with a formula of

    Year(Today)),

    And then make a dynamic form rule that says when the year field is blank, changed the year field  to the value of the field current year

    • CBH_Service_Acc's avatar
      CBH_Service_Acc
      Qrew Member

      Hey Mark,

      That's a smart idea, I didn't think of that. I just did what you suggested and it now works. 🙏 Now I just have to figure out how to get my form rule to only run when the page loads and not when the user changes what's in the field.

  •  You should be able to have a form rule that fills in that field only when it is blank. That way if the user wants to change the value of the form rule won't fire.