Date variable App Wide

  • 0
  • 1
  • Question
  • Updated 9 months ago
  • Answered
I have some fields which will need to show results based on financial year start and end date.   Instead of hard coding, it there a way we could keep these values somewhere which could be used across app and updated as and when required. 
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb

Posted 9 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 51,036 Points 50k badge 2x thumb
There is a little used feature in Quickbase called application variables. They are accessed through

Settings

Variables

They are limited in that the field type is only text. However you can still use them for your purposes. For example you could have an application very bold called

Current fiscal year start

With the value of

June 28, 2017

Them anywhere in your app you can use the formula

ToDate([Current fiscal year start])

So you were for to the application variable in square brackets just like any other field, except that the field will not be listed in any field less. It will be a globally available in all tables in that single app.

Of course, it is then totally up to you to remember to update the application variable when the year rolls around.

https://help.quickbase.com/user-assis...
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb
Thanks a lot.  Do need any special format to create the value or can I just add a date "30/06/2017" and that will come across as text and then converted to date. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,036 Points 50k badge 2x thumb
You will need to test based on your date setting in your app. I suggest using English words like my example or else you will need to test if it recognizes your Australian DDMMYYYY Date Settings.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb
Thanks.  This works fine with the example I used.  Many thanks for the insight. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,048 Points 50k badge 2x thumb
Good to know that it respected your local date format setting.