Hi All,
I am trying to create a PDF from my clients table that will send me an email of all the clients who have "fountain removal" marked in their column "treatment schedule". I want it to be just a straight list of the client and contact information all in one PDF.
The ways I've tried setting it up, it runs the actions on each row individually creating 80+ individual PDF's/emails. I want it to be all in 1.
For context here is how the data is set up.
Table: Client
Columns: Client Name, Main Contact, Main Phone, Main Email, Second Contact, Treatment Schedule
Treatment schedule is a enum where the choices are months and "Fountain removal".
Goal: get 1 PDF emailed to me with a list of the client names and contact information for all clients who have fountain removal as one of their treatment schedules.
Hi,
template you can test
<<Start:OrderBy(SELECT(Clients[Id], [Treatment Schedule]="fountain removal"),[Client Name], False)>>
IdCliente: <<[Id]>>
Client Name: <<[Client Name]>>
Main Contact: <<[Main Contact]>>
Main Phone: <<[Main Phone]>>
Main Email: <<[Main Email]>>
Second Contact: <<[Second Contact]>>
Treatment Schedule: <<[Treatment Schedule]>>
<<End>>
Hi, thank you for the suggestion. I got this error when I tried to run the bot.
Error encountered in step with name [New step]: Error: Task 'New step' Attachment template. Expression 'OrderBy(SELECT(Clients[Id], [Treatment Schedule]="fountain removal"),[Client Name], False)' is invalid due to: Unable to find table 'CLIENTS', did you mean 'Client'?. Error: Task 'New step' Attachment template. Start expression 'OrderBy(SELECT(Clients[Id], [Treatment Schedule]="fountain removal"),[Client Name], False)' should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the 'Key' column of the referenced table.
sorry, I have edited Clients[Id] to Client[Id]
Also, can you check the key field of the Client table if it is called Id? Otherwise change [Id] to the corresponding name
<<Start:OrderBy(SELECT(Client[Id], [Treatment Schedule]="fountain removal"),[Client Name], False)>>
IdCliente: <<[Id]>>
Client Name: <<[Client Name]>>
Main Contact: <<[Main Contact]>>
Main Phone: <<[Main Phone]>>
Main Email: <<[Main Email]>>
Second Contact: <<[Second Contact]>>
Treatment Schedule: <<[Treatment Schedule]>>
<<End>>
User | Count |
---|---|
17 | |
11 | |
7 | |
4 | |
3 |