How do you store global/public constants?

I’m considering using option sets to store global/public constants. Since these are public, I don’t care who sees them.

Anyone have suggestions on how to structure this option set? Values can be strings, numbers mostly.

Thank you.

Hi Matthew,

In my apps, I just create a Data Type (table) with a single entry and, on page load, I get the information from this table last item.

You can use a reusable element (1x1px) to load this information on page load, so you don’t have to configure every page.

At least, this was the easiest solution I thought.

You can create custom states on the reusable element and set these states on page load, so you can retrieve the information on every page.

Hope it’s helpful

Using an option set is fine but just remember that these can’t be updated dynamically.

I create a data type called “admin” or similar to store all the system wide values in

option set is ok but it’s harder to use than a data type

If it’s not sensitive data just use option set, make attributes for different values needed such as text or numbers

1 Like

I also found this:

This is akin to the Salesforce “Label”, which can be translated as well.

Considering what I’m mostly interested in is storing labels, this works perfectly.