Skip to main content
Question

Application Variable

  • December 20, 2017
  • 0 replies
  • 136 views

Have a formula I would like in all 75 tables in my application.  I have tried making it an application variable, but when added to the tables, it only interprets the formula as text and does not display the result of the formula.  Is there an easy way to accomplish this without linking all 75 tables to a "settings/default" table that has the formula in it?
This topic has been closed for replies.

  • Quickbase Alumni
  • December 20, 2017
Just out of curiosity, what function does the formula serve where it would be practical on every application table. I'm just hoping to understand so I can venture a guess as to how to make this easier.

A thought is that you can set the value of an application variable with an API.  API_SetDBvar

Maybe push a button each day to set the updated value?

  • Quickbase Alumni
  • December 20, 2017
Application Variables always present themselves as "Text", so depending on the result the formula is meant to display, you would need to indicate the format in the Formula field you're using to call upon that app variable by name - for the following example we'll say your app variable name is "Variable"

if you were to want to use this app wide variable on a form, you would need to use a formula type field, and in that formula you need to indicate the format the variable should result in, followed by the the variable name enclosed in brackets, just as you would when referencing any other field on that form.
Ex. ToNumber([Variable])
or ToText([Variable])
or ToDate([Variable]) etc.

Hope this helps, although I'm still really curious about your specific use-case for the app-wide formula variable.

  • Author
  • Quickbase Alumni
  • December 20, 2017
So here is the formula I want in my app variable:

ToText(Floor(Year(Today())/Day(Today())) & ToText(Day(Today()))&"9654"&ToText(Month(Today()))&"3546w")

Ultimately, this: 100209654123546w would be displayed in a field in the table.  I want to be able to change that formula globally.  I suppose I could create variables for the parts in quotes and then change those, but would prefer to have the ability to change the whole formula for the entire application and all tables in one place.

  • Author
  • Quickbase Alumni
  • December 21, 2017
Thank you to all respondents.  Please consider this question resolved.  Dan, thanks again for your guidance.  We will probably end up doing a variation of your suggestion.