Template lookup details from list of keys

par
New Member

In a table I have an EnumList column which is of type Ref to another table.
When I come to create an email template how do I parse the values in this EnumList to then return the values in the table to which it references.

My template looks like (also attached as image):

sessionID: <<[sessionID]>>
FK_InstIDCompletdBy: <<[FK_InstIDCompletdBy].[Name]>>
FK_LocID: <<[FK_LocID].[Name]>>
Date: <<[Date]>>
FK_InstID-SI: <<[FK_InstID-SI].[Name]>>
FK_InstID-FA: <<[FK_InstID-FA].[Name]>>

instSessionLog

instSessionID FK_sessionID FK_instIDCompletdBy FK_groupIDs FK_pupilIDs
<<Start: [Related instSessionLogs]>><<[instSessionID]>> <<[FK_sessionID]>> <<[FK_instIDCompletdBy].[Name]>> <<[FK_groupIDs]>> <<[FK_pupilIDs]>><>

The field [FK_pupilIDs] is a list of the primary key field in the pupils table pupils.pupilID
This will return a list of values such as 123456, 234567, 345678
I would like to display the value in the field pupils.pupilName (e.g., Fred, Bob, Will)

Any ideas on where to start would be appriciated.

Many thanks

Paul

3X_8_f_8fb370713bc4c6f95f129eaceb6f33e4b36dd386.png

Solved Solved
0 3 345
1 ACCEPTED SOLUTION

par
New Member

Many thanks for your help.
The final solution didnโ€™t require the dereference and so read:

<<CONCATENATE(SELECT(pupils[pupilName], IN([pupilID],[FK_pupilIDs])))>>

View solution in original post

3 REPLIES 3
Top Labels in this Space