Hello, I wanted to ask if someone knows whether it would be possible to somehow select (filter based on some conditions) related record to print it's data in the PDF? Similar idea to how you would use do SQL queries.
In our case we want to select a meeting related to an contact, that has a specific phrase in it's name and print it's information in the PDF. PDF itself needs to be based on the contact entity since meeting can have multiple related contacts.
To illustrate it in SQL query form it should look something like this:
SELECT dateStart
FROM Meetings
WHERE name LIKE '%SomePhrase%'
ORDER BY ABS(DATEDIFF(dateStart, CURDATE()))
LIMIT 1;
In our case we want to select a meeting related to an contact, that has a specific phrase in it's name and print it's information in the PDF. PDF itself needs to be based on the contact entity since meeting can have multiple related contacts.
To illustrate it in SQL query form it should look something like this:
SELECT dateStart
FROM Meetings
WHERE name LIKE '%SomePhrase%'
ORDER BY ABS(DATEDIFF(dateStart, CURDATE()))
LIMIT 1;
Comment