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! Go to Solution.
Instead of SELECT(ACTIVITES[intitule], ...), use this:
LOOKUP([_THISROW], "ACTIVITES", "id", "intitule")
Your select() function looks wrong
SELECT(ACTIVITES[intitule], ([_THISROW] = [id]))
drop the extra brackets
SELECT(ACTIVITES[intitule], [_THISROW] = [id])
Hi @jeremyTDC
In addition to @1minManager 's suggestion, you can try this too (not tested):
Prรฉnom | Nom | Age | Activitรฉ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 ..
Can you share a screenshot of your table structures ?
And a screenshot of your template as well
Instead of SELECT(ACTIVITES[intitule], ...), use this:
LOOKUP([_THISROW], "ACTIVITES", "id", "intitule")
User | Count |
---|---|
40 | |
32 | |
30 | |
17 | |
16 |