Lookup / match value

Hello

I see another topic today with a problem with lookup function, but my problem seems to be a quite different i think, that’s why i creat another one.

LOOKUP(match-value, table-name, match-column, return-column) is normally ok with different table of my Appsheet development, but i have a table, which agregates three tables, in order to create a pdf ( with workflow function)…

My agregate table, is a copy of my first table ( table “control”) , which is containing different row. i’ve got a table ( planning_control) and a table (sign_control)

To have a match value , i agregate, date of planning, name of the controller, site, and it’s the key, or it might be the index-key…
to by pass character "/"of the date i extract year, month, day - impossible to get the hour and minutes -at this step- from a column date of the planning-control table- and i concatenate values ( auto compute) in the expression assistant.
i use “~” to an easier capacity of reading:

in the planning table:

Blockquote
YEAR([Date])&MONTH([Date])&DAY([Date])&"~"&[Contrôleur]&"~"&[Site]

Blockquote

and my request to complete the table for my workflow

Blockquote

LOOKUP([Numctrl], “Preparation_controle”, “Numctrl”, “Contrôleur”)

Blockquote

In others test app, no problem, in this impossible, i’ve got only the first line , repeat for every row, even if the match value “numctrl” is diferent and nothing diferent with real or virtual columns…

Anyone could told me what’s wrong with it, the expression is good ( seems to be) , characters don’t seem to be a problem, I don’t understand… :shushing_face:

Thanks for any help

Laurent

Have you tried with:

LOOKUP([_THISROW].[Numctrl], “Preparation_controle”, “Numctrl”, “Contrôleur”)

2 Likes

The Troubleshooting section of the LOOKUP() help doc addresses your issue:

2 Likes

Hello

Thanks for your answer,

[_THISROW].was missing. With this expression it’ allright

2 Likes

If I understand the troubleshooting section,

For my problem, I must use.

 LOOKUP ([_ THISROW]. [Matchvalue], ...)

because it is the same as an order detail=> the same reference for the different lines of my table.

I can use the :

 LOOKUP ([MATCHVALUE], ....)

only if I have a unique reference like [matchvalue] and for the third LOOKUP solution :

([_ THISROW], ..... )

I don’t understand its usefulness,

I have difficulties to understand the difference between the 3 expressions, so why not use the LOOKUP ([_ THISROW]), each time, if it is more effective?

Faithfully yours

1 Like

You should always use [_THISROW].[matchvalue].

1 Like

Yes, i will do that!

Thanks

2 Likes