Lookup / match value

lga
New Member

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…

Thanks for any help

Laurent

Solved Solved
1 8 1,914
1 ACCEPTED SOLUTION

Yes, i will do that!

Thanks

View solution in original post

8 REPLIES 8

Have you tried with:

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

Hello

Thanks for your answer,

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

Steve
Platinum 4
Platinum 4

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

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

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

Yes, i will do that!

Thanks

Just found this and it solved my similar issue, but mysteriously another lookup in the same email body doesn’t need _THISROW to work. Both are simple numeric keys for different tables, and one returns a value while the other one always gets the first row.

Wish I knew why one lookup consistently works and the other consistently does not, with _THISROW not in play.

This question is answered above.

Top Labels in this Space