I see three check boxes. In one field or three? Selecting which box or boxes indicates that they should be in the list?
Those details affect the calculation you might use.
In general, it can look like this:
Define a calculation field, cEmailIfSelected such as:
If ( <test expression here> ; Email )
Then List ( relatedTable::cEmailIfSelected )
will return your list of emails.
What exact expression you put in place of <test expression here> will depend on how you set up your check boxes and which value or values indicate that it should be part of this list. If you have a single field with multiple check boxes, you'll need to use the FilterValues function to determine which values were selected.
These are 3 different fields. Each checkbox will allow, or not, system to send emails with attached Order, Invoice or Packing list. And this should be done user-by-user. In my example if I click SEND INVOICE I want them to be sent to email@example.com and firstname.lastname@example.org and ingnore email@example.com. If I want to send ADDendum -> system will ingnore firstname.lastname@example.org.
Which means that you sould need three such pairs of if funcitons and list calcualtions if you continue to use this approach. There might be simpler options, however that work directly from a found set instead of the list of emails.
cSendInvoiceEmail: If ( Not IsEmpty (sendInvoicecheckbox) ; EmailField 0
cSendInvoiceList: List ( RelatedTable::cSendInvoiceEmail)
repeat for the other two email options.
Very well done! Thank you! working like a magic! Just a little thing I adjusted:
cSendInvoiceList: Substitute ( List ( RelatedTable::cSendInvoiceEmail ) ; ¶ ; "; " )
this will help my email client to divide addresses.... i hope