Good day.
Maybe I am just tired, but I can’t figure this out.
I have a Admin Sheet with 2 Columns.
CONSTANT and VALUE
To use these in a formula to for instance calculate Price of a Product, I use
[COST]*(1+INDEX(ADMIN[VALUE],1))
So this “INDEX(ADMIN[VALUE]” refers to the value of the markup constant.
Is there a way to read these values into global constants to then be able to just write
[COST] * CONSTANTS[MARKUP] or something similar?
Thanks
Gert
First, your table doesn’t have a key column. That shouldn’t be a problem in this example but don’t do that on production apps.
INDEX(ADMIN[VALUE], 1)
should return .6
What do you mean by this?
The only way to achieve a “global constant” is a table with one row and refer to it as
INDEX(TABLE[COLUMN], 1)
or (but less advisable) ANY(TABLE[COLUMN])
assuming that [COLUMN]
holds the value you need
LOOKUP( "MARKUP" , "global-constants" , "constant" , "value")
I was hoping I missed a constant definition somewhere in the AppSheet platform.
If it was possible one would have been able to refer to the constant merely by it’s name.
Both your suggested solutions would work, but I think INDEX(ADMIN[VALUE], 1) is the shortest to type and yes it returns 0.6.
Using these in many places it becomes a schlep to type and to remember the correct index to use.
Thanks
Gert
You did not, there is none.
User | Count |
---|---|
32 | |
31 | |
30 | |
19 | |
17 |