Hi Folks,
Trying to figure out the scripting for Ampscript to do the following. When a record is added to a Data Extension an email is triggered and sends an email with an attachment. The field that holds the name of the attachment is [LiveChatNow Major Code] and the DE name is [Import Live Chat Contacts - Program Of Interest]
This is what I have but it doesn't work
%%[ var @Program,@ColumnProgramCode , @file set @Program =v([LiveChatNow Major Code]) set @ColumnProgramCode = Lookup("[Import Live Chat Contacts - Program Of Interest]", "[LiveChatNow Major Code]", @Program) SET @file = Concat(@ColumnProgramCode, '.pdf') ]%% %%=IIF(Empty(@ColumnProgramCode), '',AttachFile('FTP',@file))=%%3 comments
got it to work:
%%[var @Program,@fileset @Program = [LiveChatNow Major Code]set @file = Concat(@Program, '.pdf') if not empty(@Program) then /* attach file to email / AttachFile('FTP',@file)else / do nothing */endif]%%