SEND E-MAIL WITH ATTACHMENTS FROM AN OTHER TABLE
Hi,
I've 2 tables :
table 1 : CLIENTS
table 2 : INVOICES
In table 2, I have many records with attachemts and i want to create a button on table 1: "SEND INVOICES OF THE MONTH".
I'm trying to use the formula :
from: userEmail(),
to: CLIENTS.'E-mail',
subject: "INVOICE",
text: " ",
attachments: ??? --- i need to select on table 2 all the files in attachments with a specific month (date)
Someone can help me
Thanks a lot
1 reply
-
Hi. Not sure if this is relevant but I came across this post while searching for a solution to the problem.
I've done it as follows. I'm still quite new to Ninox so I'm sure there is a better way to define a document array at the beginning.
Main file is the document filed from the main table.
filefromSubTable is the document field from the sub table.
let docList := [mainFile]; let newDoc := [mainFile]; for i in subTable do newDoc := [fileFromSubTable]; docList := array(docList, newDoc) end; sendEmail({ from: "email@address.com", to: "email@address.com", subject: "Ninox Attachments test", text: "Ninox Attachments test", attachments: docList })
Content aside
-
1
Likes
- 1 yr agoLast active
- 1Replies
- 479Views
-
2
Following