Getting this error: 'A variable name is not a valid because contains illegal characters. Variable names must begin with the @ symbol followed by one or more letters, numbers, or underscores. Variable Name: <' When trying to run this AMPscript code - the '<' symbol is not in
%%[ var @rows, @row, @rowCount, @numRowsToReturn, @lookupValue, @i, @Pricebookname
set @lookupValue = AttributeValue("Name")
set @numRowsToReturn = 0
set @rows = LookupOrderedRows("SalesforceApplication_Website",@numRowsToReturn,"Pricebook_Name__c
asc","Name", @lookupValue) ]%%
%%[ set @rowCount = rowcount(@rows)
if @rowCount > 0 then
for @i = 1 TO @rowCount do
set @row = row(@rows,@i)
set @Pricebookname = field(@row, "Pricebook_Name__c")
IF (@Pricebookname == 'city Low') then
%%=AttachFile(Contentbuilder,445768)=%%
elseif (@Pricebookname == '43in B') then
%%=AttachFile(Contentbuilder,445765)=%%
elseif (@Pricebookname == 'B saver') then
%%=AttachFile(Contentbuilder,445764)=%%
elseif (@Pricebookname == 'Nat G User - 2022') then
%%=AttachFile(Contentbuilder,445763)=%%
EndiF ]%%
%%[ next @i ]%%
%%[ else ]%%
%%[ endif ]%%
Any help is much appreciated
AttachFile()
, as you are already using%%[ ]%%
... Example: instead of%%=AttachFile(Contentbuilder,445768)=%%
just useAttachFile(Contentbuilder,445768)