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,938
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