HOW TO Set up configuration documents

Eric BREHAULT edited this page Sep 21, 2016 · 1 revision

Configuration documents allow to manage parameters or values list outside the database design.

When creating a selection list in a form, you may enter the values list directly in the field settings.

It makes no problem if this list is not supposed to change (for instance: yes/no).

But some values list have to change from time to time (for instance, the company departments names), and it would be better to be able to change them without going into the design.

To ease the management of those lists, or to manage any type of other parameters (like a contact email address, the national VAT rate, or the path to a CSV file to import, etc.), you can use configuration documents.

Configuration documents form contains 2 fields:

  • an ID,
  • a value (possibly multi-lined).

A view displays all the existing configuration documents, and allows to perform lookups to find a configuration document.

You can copy the following elements from this sample database:

  • frmConfig (form),
  • configview (view),
  • scriptConfig (resource).

Once imported in your database, you can get config values using formulas like:

return db.callScriptMethod("scriptConfig", "getConfigValue", db, "Reference year")

or (for multi-values):

return db.callScriptMethod("scriptConfig", "getConfigValuesAsList", db, "Departments")
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.