I am building a booking app for a youth club. In this app I have created an automation for sending emails to applicants who has sent booking requests. In this email I want to generate a table of records of the rules ([Regler] in Norwegian) that are related to each Rom they have chosen to book.
Header:
Svar på din forespørsel: <<[Status]>>
Tidsmerke: <<[Tidsmerke]>>
E-postadresse: <<[E-postadresse]>>
Navn: <<[Navn]>>
Telefon: <<[Telefon]>>
Start: <<[Start]>>
Slutt: <<[Slutt]>>
Rom: <<[Rom]>>
Beskrivelse: <<[Beskrivelse]>>
Schema: BookingrequestRom ← Rom[Related Reglers] ← Regler[Rom]
I managed to do this with this nested <>-expression.
<<Start: [Rom]>>
Rom |
Regel / sjekkpunkt |
Beskrivelse |
Tegning |
|---|---|---|---|
<<Start: [Related Reglers]>><<[Rom]>> |
<<[Regel / sjekkpunkt]>> |
<<[Beskrivelse]>> |
<<[Tegning]>><> |
However, this gives as result a table for each [Rom], which is ok, but also for the [Rom]s that currently has no [Related Reglers]. Hence, a bunch of empty tables in between. So how can i filter this?
I tried a select expression directly refering to the [Relger]-table with a nested IN-function to check whether a [Regel] is part of the List[Rom]
<<Start: Select(Regler[Regel ID], IN([Rom], LIST([_THISROW].[Rom])))>><<[Rom]>>
<<[Regel / sjekkpunkt]>>
<<[Beskrivelse]>>
<<[Tegning]>><>
<> in first cell, <> in last.
I presume the LIST([_THISROW].[Rom]) part is flawed, since (presuming) [_THISROW] is single value however put?
Anyway, this returns blank table, no error in the monitor.
Appreciate any ideas on this : )
-Bjørnar