LOOKUP on virutal column not work. Where am I wrong?

Hi,
in the app that I have created and am trying to implement I have a problem.
Inside the T_RISULTATI table I created a virtual column to have the value “team name” (TEAMID) returned in the “deck” view.
I used the LOOKUP function in the “formula” field:

LOOKUP(ID_CICLISTA, T_ROSA, ID_CICLISTA, IDSQUADRA)

where is it:
ID_CICLISTA is the reference value present in the T_RISULTATI table
T_ROSA is the table where to find the TEAMID value
ID_CICLISTA is the column of the T_ROSA table where to look for the reference value
IDSQUADRA is the value to return.

The expression assistant tells me that the formula is correct (image 1)

but I am not displaying any data (image 2).

I also followed this guide:
https://help.appsheet.com/en/articles/2357309-lookup

Where am I wrong?
I thank in advance who can help me
Luigi

I don’t think you read the doc very thoroughly.

2 Likes

Could you please try

LOOKUP([_THISROW].[ID_CICLISTA], “T_ROSA”, “ID_CICLISTA”, “IDSQUADRA”)

2 Likes

Hi @Steve ,
Sorry that I did not see you had already replied, while I was typing in the reply.

1 Like

Thank you I have solved.

I had done a similar test like this:
LOOKUP(THISROW.ID_CICLISTA, T_ROSA, ID_CICLISTA, IDSQUADRA)
But I was wrong in parentheses.
Excuse me but very little experience in programming.

@Suvrutt_Gurjar One comma too much :slight_smile:

2 Likes

Hi @neardj ,

No problem. You are welcome. I suggest you please refer help articles on AppSheet functions. @Steve has shared some excellent practical examples and pitfalls to avoid therein.

2 Likes

Thank you @Aleksi for your keen eye as usual. :slight_smile:

I corrected the error for any future reference of the post.

2 Likes