I am trying to hide a field depending on a value in another table.
I have 2 tables:
Inventory table - contains various item details, including a Quantity column which I only want to be visible if the QuantityRequired value is set to true for the particular type of Device in the LookupDevice table.
LookupDevice table - contains all types of Device, QuantityRequired and others
If QuantityRequired = TRUE when matched by Device in Inventory and LookupDevice tables then I want the quantity field to be visible on a form, otherwise hide it.
I have tried:
IF(LOOKUP([_THISROW].[Device], โLookupDeviceโ, โDeviceโ, โQuantityRequiredโ)=TRUE, TRUE, FALSE)
which seems to evaluate correctly when I test output of the expression, but it makes no different at all to the visibility of the field in the form.
The system displays: IF this condition is true:
โฆ(One randomly chosen value from this list (
โฆThe list of values of column โQuantityRequiredโ
โฆfrom rows of table โLookupDeviceโ
โฆwhere this condition is true: ((The value of column โDeviceโ) is equal to (The value of โDeviceโ from the row referenced by โKeyโ)))) is equal to (โTRUEโ)
THEN use the value of:
โฆโTRUEโ
ELSE use the value of:
โฆโFALSEโ
Help!
Thanks,
DG3
Solved! Go to Solution.
Hello and welcome to the community!
So basically, your Inventory should have a reference column to the LookupDevice table, with the latter key column named letโs say deviceID.
For a particular row in your table, in order to retrieve a value from a referenced row in another table you should use the following expression:
[keyID].[valueToRetrieve]
So in your case you should use: [deviceID].[QuantityRequired]
, and the expression to use for the Show_IF formula should be: [deviceID].[QuantityRequired] = TRUE
I encourage you to read the short, informative guides below:
Hello and welcome to the community!
So basically, your Inventory should have a reference column to the LookupDevice table, with the latter key column named letโs say deviceID.
For a particular row in your table, in order to retrieve a value from a referenced row in another table you should use the following expression:
[keyID].[valueToRetrieve]
So in your case you should use: [deviceID].[QuantityRequired]
, and the expression to use for the Show_IF formula should be: [deviceID].[QuantityRequired] = TRUE
I encourage you to read the short, informative guides below:
Thanks - took a while to get my head around referencing things correctly but itโs working the way I want it now.
If youโve not already found a solution, please post a screenshot showing the unwanted column displayed.
User | Count |
---|---|
39 | |
35 | |
29 | |
23 | |
18 |