Is it possible to create variables for use in formulas?

Hi,

Is there a way to create variables for access in formulas through an app?

Example use case.

Setting

  1. Shipping rates
  2. Margins
  3. Default terms

Is it best to create a new Type called Settings and each setting would be an entity there?

Thank you

Interesting idea. Are these ‘settings’ things that would vary from entity to entity? Would they be determined based on the values of some other entity fields?
Would they change over time or are they in effect constants?
Numbers? Text?

As you can tell, I’m intrigued :slight_smile:

Interesting problem. The downside of a separate Type is that you will have to always set a relation to the Setting entity for every other entity, if that is not a problem, then Setting Type looks good.

Also note that you can create very simple formulas that return constant. Like this:

And you can use these basic formulas in more complex formulas.

Another reason why polymorphism will be great :stuck_out_tongue:

@Chr1sG @mdubakov - Thank you. Yes, they would be constants.

@mdubakov - This is good to know. I think my main concern is can I have a formula declared in one place somehow and then used across multiple apps?

I would also be concerned about the number of constants if they would need to be added as fields to a type. Might have 15-30 in a single app. I wonder if that would create a lot of noise when sifting through columns.