In my DE, I have a list of last 4 of account numbers in one field. The list is delimited by a pipe and will be different for each record in the DE (could be 2 account numbers, could be 100 account numbers). I am trying to format these into an email separating them with a comma and a space, then ending the list with a period.
How I want it to look:"This message is applicable to your account(s) ending in: 1234, 1235, 1236, 1237."
Right now, the ampscript below shows it like:This message is applicable to your account(s) ending in: 1234, 1235, 1236, 1237,"
How can I end this dynamic string of numbers in a period and not a comma?
%%[ var @acctList, @rows, @row, @rowCount, @acctArray, @i set @acctList = AttributeValue('ACCT_LAST_4') set @rows = BuildRowsetFromString(@acctList,",") set @rowCount = rowCount(@rows) if @rowCount > 0 then for @i = 1 to @rowCount do var @acctArray set @row = row(@rows, @i) /* get row based on counter */ set @acctArray = CONCAT(field(@row,1),',') ]%% %%=v(@acctArray)=%% %%[ next @i ]%% %%[ else ]%% %%[ endif ]%%