Transferring refs from one table to another

I have a PRODUCTS table , a PRODUCT_TEMPLATES table and an OPERATIONS table. The operations tableโ€™s rows reference some rows of the products table. Now, I have an action on each Product entry that when clicked, will create a new Operation entry for each operation that is already linked to the respective product, and link it to the last PRODUCT_TEMPLATE entry (which is created through another action) in the database.

Since the operations table is linked to the products table, there is a VC called โ€œRelated OPERATIONSs]โ€ holding those refs. What iโ€™ve been trying to do in order to extract the values of those refs is something like this:

INDEX( [Related OPERATIONSs], 1).[OPERATION_TYPE_UID] to get the [OPERATION_TYPE_UID] ref.

Despite the results returned being correct (checked through โ€œTestโ€), I get an Error saying that the return type doesnโ€™t match the required โ€œRefโ€ type. Why is that?

Solved Solved
0 2 214
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

Instead of this:

INDEX( [Related OPERATIONSs], 1).[OPERATION_TYPE_UID]

try this:

INDEX( [Related OPERATIONSs][OPERATION_TYPE_UID], 1)

View solution in original post

2 REPLIES 2

Steve
Platinum 5
Platinum 5

Instead of this:

INDEX( [Related OPERATIONSs], 1).[OPERATION_TYPE_UID]

try this:

INDEX( [Related OPERATIONSs][OPERATION_TYPE_UID], 1)

Works like a charm, thanks a ton Steve!

Top Labels in this Space