WorryFree Computers   »   [go: up one dir, main page]

Combination of Reference and Derefernce

K5
Bronze 5
Bronze 5

Hi, There is a Products table and a ProductsColor table, which are parent-child relationships, and there are OrderProducts and OrderColor tables that reference them.

relatiob.png
When entering a color from the form in the OrderColor table, I want to display only the colors of the associated Products as choices.

ColorCulumn.png

In the Color column of the OrderColor table, in the Valid If

[OrderProductsID]. [ProductsID]. [Related ProductsColors][Color].

but I get an error.

exptrssion.png

What went wrong?
What should I do?

Solved Solved
0 2 43
1 ACCEPTED SOLUTION

Your expression is missing a period between the last to columns:

[OrderProductsID]. [ProductsID]. [Related ProductsColors].[Color]

However I am going to guess this still will not work since I don't believe Appsheets dereference allows for you to access columns which are not the key column based on the related columns. I hope I am wrong, but if you correct your condition above and are still getting an error, you might need to use a SELECT condition. 

View solution in original post

2 REPLIES 2

Your expression is missing a period between the last to columns:

[OrderProductsID]. [ProductsID]. [Related ProductsColors].[Color]

However I am going to guess this still will not work since I don't believe Appsheets dereference allows for you to access columns which are not the key column based on the related columns. I hope I am wrong, but if you correct your condition above and are still getting an error, you might need to use a SELECT condition. 

K5
Bronze 5
Bronze 5

Thank you for your advice!
The formula you mentioned was tried first, but unfortunately it resulted in an error.

I didn't know that dereference can only refer to key columns.
I'd like to give up and consider using the select syntax or adding a virtual column.

Thank you!

Top Labels in this Space