LOOKUP with wrong result

Hello,

Iโ€™m using LOOKUP expression in table named [PRODUCTS] to get a unique code from another table named [CUSTOMERS].

LOOKUP expression goes to the right Column which is CUSTOMER CODE but give me the wrong CUSTOMER CODE that refers to the PRODUCT CUSTOMER NAME i choose.

This is the expression iโ€™m using :

LOOKUP([PRODUCT CUSTOMER NAME],โ€œCUSTOMERSโ€,โ€œPRODUCT CUSTOMER NAMEโ€,โ€œCUSTOMER CODEโ€)

  • PRODUCT CUSTOMER NAME : is a column in table [PRODUCTS] where iโ€™m using the LOOKUP expression
    CUSTOMERS : is the table where LOOKUP expression needs to get the right value from CUSTOMER CODE column

Please help me with that
Many thanks

Solved Solved
0 13 794
1 ACCEPTED SOLUTION

Have you tried dereference formula likeโ€ฆ [PRODUCT CUSTOMER NAME].[CUSTOMER CODE]

View solution in original post

13 REPLIES 13

You need to add [_THISROW] so your LOOKUP() would understand to read the value from a record where you trigger this formula.

LOOKUP([_THISROW].[PRODUCT CUSTOMER NAME],โ€œCUSTOMERSโ€,โ€œPRODUCT CUSTOMER NAMEโ€,โ€œCUSTOMER CODEโ€)

Hi

i got the same wrong resultโ€ฆ

Any change that you have more than one value in your Product Customer Name column?

PRODUCT CUSTOMER NAME column is a REF type from table CUSTOMERS so i can only choose from

And you have the same โ€œProduct Customer Columnโ€ in both tables?

you mean PRODUCT CUSTOMER NAME ? not PRODUCT CUSTOMER COLUMN right ?
if yes no not the same nomination in both tables

Have you tried dereference formula likeโ€ฆ [PRODUCT CUSTOMER NAME].[CUSTOMER CODE]

No How i do that ?

yeah it works !
thank youuu

When you have a Ref field in your Products table already, you can call what ever columnโ€™s value from the Customers table with a deref formulaโ€ฆ
[YourRefColumnName].[ColumnNameInCustomersTable]

so i need to add the column CUSTOMER CODE is table PRODUCTS so i can call later right ?

Good

a very easy way to get the unique CODE

Top Labels in this Space