I have three tables. Item
and Faves
, which are both read-only, and Save
, which can be edited.
I also have a user setting called Preview Mode
, which is of type Yes/No
and has an initial value of true
.
Item has a virtual column SID
with the formula IF(USERSETTINGS("Preview Mode"), "zzz", [ID])
ID
is a real column which contains the keys for the table.
SID
is a reference to the Save table.
Item also has a virtual column Item Value
with the formula [SID].[Value]
Value
is a real column in the Save table.
Item Value
will never be 0 unless SID
is โzzzโ or the value of ID
does not exist in the Save table.
Faves has a virtual column Valuef
with the formula [Itemf].[Item Value]
Itemf
is a virtual column with a reference to the Item table.
Assuming that the item being referenced exists in the Save tableโฆ
No matter the value of Preview Mode
, Valuef
is always greater than 0, meaning that within the Faves table the value of Preview Mode
is always false
.
Am I doing something wrong? or is there a problem with references? My only solution at this point is to add multiple Preview Mode
checks within other virtual columns, but I was hoping changing SID
, which all other calculated values in my app are derived from, would be enough.
Are you columns that you referred to Real or Virtual? Are you aware of the difference between when expression in Real columns evaluate (only when the record is edited), vs in expressions in Virtual columns (on every sync)?
I apologize for not clarifying that all the columns are virtual with the exception of the ID
column in the Item table, and the Value
column in the Save table. I was also not aware of when real columns were evaluated, but none of the real columns in my problem use expressions.
Iโm sorry I donโt see anything wrong. That could be because your description of your setup is incredibly hard to follow, screenshots always help. Surely there is an easier way for you to setup your required functionality. What are you even trying to do?
User | Count |
---|---|
15 | |
15 | |
8 | |
7 | |
4 |