Creating emails in trigger using table data

I know this can be done but I’m running into a brick wall. I am trying to set up an email to be sent to pull data from the table whether it be three data points or 6 data points. I set up the email to include all fields that I want to report on if there is data available however, if there is only one set of information I need to send (not all), the email is not sending. I spoke to Live Chat and they suggested using LINK in the expression but I’m still having issues getting the email to run properly. I miss the day of using the STATIC function.

hello @hwagner, we can certainly help out here!!

could you share a screenshot of the Trigger that sends the email??

in general, the LINK() function returns the first argument that isn’t Null. in this example, if @Variable.QR has a value, that will be sent. otherwise, “Hello World” would be emailed:

Thanks Gio,

I think maybe I was not explaining it correctly to Live Chat because they told me to use this to send the message if I only had one part #/description/qty to send even though the message was built out to show all 5 should there be that many (if that makes sense).

This is a test that I created to make sure it worked. For example, if only one table record is in the table then I want this email to send even though it is mapped out for two.

image

OK, thanks for clarifying @hwagner!!

have you tried placing all the individual Table Record Fields in LINK() functions??

for example: LINK(Table Record.Parts Assembly.Missing Parts 2, ""). in this example, if there is a Missing Parts 2 present, it’ll be included in the email. else, it’ll include an empty string.

let me know if this is helpful!!

Ok. Let me try that as I did not put the two " " in the string.

1 Like

Hi Gio,

I tried doing this and it only partially worked. Hoping you can help.

image

image

Thanks,
Heather

hello @hwagner,

it looks like there are some unclosed parentheses in some of the LINK() functions, starting at the the Table Record.Parts Assembly.Missing Parts 3. could you try adjusting this and letting me know if it solves it??

furthermore, you could place the commas in the first arguments of the LINK() functions to avoid the trailing commas:

let me know if this helps!!