Get a data from another table in my template document

Hey guys !

At first : sorry for my english (french guy aha)

Let me explain my problem : I'm currently trying to create a montly report for my application, so I have decided to use an automation with a template document..

I have two tables : one for people ( called GENS) ; one for activities (called ACTIVITES). people have a main activity (ref to the second table).

My question is.. how can i retrieve the name of the activity while i'm listing people in a table : I know that I Have to use a select tag in my template to search the good row in my activity table.. but I can't find how to do this

 

I tried :

<<Start:GENS[id]>>

<<prenom>>

<<nom>>

<<age>>

<<SELECT(ACTIVITES[intitule], ([_THISROW] = [id]))>>

<<end>>

and :

<<Start:GENS[id]>>

<<prenom>>

<<nom>>

<<age>>

<<SELECT(ACTIVITES[intitule],[id] =[_THISROW][id])>>

<<end>>

 

I searched in the doc but it didn't help me ... Can you please help me to know what's going wrong please ?

 

Solved Solved
0 5 295
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Instead of SELECT(ACTIVITES[intitule], ...), use this:

LOOKUP([_THISROW], "ACTIVITES", "id", "intitule")

 

View solution in original post

5 REPLIES 5

Your select() function looks wrong

SELECT(ACTIVITES[intitule], ([_THISROW] = [id]))

drop the extra brackets

SELECT(ACTIVITES[intitule], [_THISROW] = [id])

Aurelien
Google Developer Expert
Google Developer Expert

Hi @jeremyTDC 

In addition to @1minManager 's suggestion, you can try this too (not tested):

PrรฉnomNomAgeActivitรฉs
<<Start:Gen[ID]>><<[Prenom]>><<[Nom]>><<[age]>><<[Related ACTIVITES][Intitule]>><<End>>

(it does not render as I want here: please do NOT add any line break)

(pas de retour chariot, tout doit se suivre comme s'il n'y avait qu'une seule ligne d'รฉcriture dans la deuxiรจme ligne du tableau)

Thanks for your replies !

I try both but it seems that it does'tn work, is there another solution to get a data from another table ? I can't imagine that this basic action is not included in Appsheet ..

Aurelien
Google Developer Expert
Google Developer Expert

@jeremyTDC 

Can you share a screenshot of your table structures ?

And a screenshot of your template as well

Steve
Platinum 4
Platinum 4

Instead of SELECT(ACTIVITES[intitule], ...), use this:

LOOKUP([_THISROW], "ACTIVITES", "id", "intitule")

 

Top Labels in this Space