Application variables

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
Is it possible to create a table where defined application variables could be updated? How fields of this table could be defined to call the application variable
Photo of RAFAEL VALCARCEL

RAFAEL VALCARCEL

  • 160 Points 100 badge 2x thumb

Posted 2 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Not natively. But you can create a table called Settings with 1 record in it. It will be Record ID number 1.

Then in any tables where you need values from that single record., you can create a formula numeric field with a formula of 1 and relate that table to the the Settings table and look up values

Set access permissions for the Settings table to the appropriate Roles.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
If you make a formula numeric field with a formula of 1 it will calculate to a 1
Photo of RAFAEL VALCARCEL

RAFAEL VALCARCEL

  • 160 Points 100 badge 2x thumb
I do not understant what you mean saying a formula of 1 ¿?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Make field of type formula numeric.
put a 1 in the formula box as a formula.

Not surprisingly, it will always calculate the result to be 1.

The point is that the settings table has a record ID# of 1 in its one and only record.so to match up with that your child table, the child table also needs to have a 1 in it to make the relationship lookup the correct record from the settings table.
Photo of RAFAEL VALCARCEL

RAFAEL VALCARCEL

  • 160 Points 100 badge 2x thumb
I see, clever idea, so that way you do not need select in table 2 anything and it all will be automatic. I understand. I will try later today. Thanks very much for your support. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Yes!  you get it!  Great.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Actually there is an API for that. So it does mean you could enter a value on a record and push a button to call an API to update the Application Variable.

https://help.quickbase.com/api-guide/...
Photo of RAFAEL VALCARCEL

RAFAEL VALCARCEL

  • 160 Points 100 badge 2x thumb
My question is related to the first one. I manage to make a formula in table 2 that is able to include the same value in all records in an specific fielt refering to a variable. ToNumber([var1]). This was ok. But to change the value is not very practical to go to the application variable menu to change the varialble value. This is the reason why I wanted to create a table to access to edit these variable values. I am new with quicked and I have not idea what an API is and where I have to put it or write it. I assume is not easy but could you give me a clue or a document where it is explaned. I ckeck the user guide, but where API functions are defined, but this does not help me. I have not a clue how it works 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
If you are not comfortable with llearning APIs then a solution without APIs was posted as my first suggestion.

If you want to learn about APIs I put an app in the Exchange called APIs for Dummies. It's a good starting point on the basics for making a URL formula button to do something. I have never done an API myself to update an Application variable and I'm not sure when I will have time to test that.