Skip to main content
Improved formatting
Source Link

Trying to switch out the static attachment in an email to dynamic based on a Data Extension(DE).

The Static: %%[ %%=AttachFile("FTP","AIDI.pdf")=%% ]%%

%%[
%%=AttachFile("FTP","AIDI.pdf")=%%
]%%

And what I'm tried to replace it with:

%%[ var @Program,@ColumnProgramCode set @ColumnProgramCode = Lookup("Program_Interest_G", "ProgramCode", "ProgramOfInterest", @Program)]%% %%[ %%=AttachFile('FTP',%%@ColumnProgramCode%% +'.pdf')=%% ]%%

%%[ var @Program,@ColumnProgramCode  set @ColumnProgramCode = Lookup("Program_Interest_G", "ProgramCode", "ProgramOfInterest", @Program)]%%
%%[
%%=AttachFile('FTP',%%@ColumnProgramCode%% +'.pdf')=%%
]%%

The DE is Program_Interest_G the filed name is ProgramCode

Trying to switch out the static attachment in an email to dynamic based on a Data Extension(DE).

The Static: %%[ %%=AttachFile("FTP","AIDI.pdf")=%% ]%%

And what I'm tried to replace it with:

%%[ var @Program,@ColumnProgramCode set @ColumnProgramCode = Lookup("Program_Interest_G", "ProgramCode", "ProgramOfInterest", @Program)]%% %%[ %%=AttachFile('FTP',%%@ColumnProgramCode%% +'.pdf')=%% ]%%

The DE is Program_Interest_G the filed name is ProgramCode

Trying to switch out the static attachment in an email to dynamic based on a Data Extension(DE).

The Static:

%%[
%%=AttachFile("FTP","AIDI.pdf")=%%
]%%

And what I'm tried to replace it with:

%%[ var @Program,@ColumnProgramCode  set @ColumnProgramCode = Lookup("Program_Interest_G", "ProgramCode", "ProgramOfInterest", @Program)]%%
%%[
%%=AttachFile('FTP',%%@ColumnProgramCode%% +'.pdf')=%%
]%%

The DE is Program_Interest_G the filed name is ProgramCode

Source Link

AmpScript file attachment to email

Trying to switch out the static attachment in an email to dynamic based on a Data Extension(DE).

The Static: %%[ %%=AttachFile("FTP","AIDI.pdf")=%% ]%%

And what I'm tried to replace it with:

%%[ var @Program,@ColumnProgramCode set @ColumnProgramCode = Lookup("Program_Interest_G", "ProgramCode", "ProgramOfInterest", @Program)]%% %%[ %%=AttachFile('FTP',%%@ColumnProgramCode%% +'.pdf')=%% ]%%

The DE is Program_Interest_G the filed name is ProgramCode