Now that you have provided us with the structure, what you should do is the following:
Your base table is contact company
For Each
Order idContacto
&emails = NullValue(&emails) // Se basea la variable que concatenará los correos
For Each // Join hacia la tabla canalcontacto
Order idContacto
&emails += contactoemail + NewLine()
EndFor
Load // Load del Grid
EndFor
What happens is the following:
- Parts of the base table to obtain the contact data.
- You make a Join to the canalcontacto table, in which the variable & email will be loaded with the emails followed by a NewLine () for the line break.
- Load of the Grid
This should be done in the Load event, if you have a single grid in the web form, just:
Event Load
// Tu codigo
EndEvent
If you have several grids:
Event TuGrid.load
// Tu codigo
EndEvent
And in the end, so that the emails come out to you vertically, in the properties of the variable & email (in the web form) you will have to put Autoresize: True .
I hope you will be helped, greetings.