0

I wanted to understand how I can populate bullet points through AMP script in an email when my imported file has a column of values separated like this below:

hazelcast-hibernate5 (devOpsHazelcast);Kubernetes Discovery Plugin for Hazelcast (devOpsHazelcast);

All the records have a different number of fields that being said they will have a different number of bullet points in the email.

It would be helpful if you could provide me the right AMP script. Thank you!

1 Answer 1

2

Turn your data into a row set using BuildRowSetFromString() and then loop around the records in your row set:

Here's my bullet list
<ul>
    %%[
      SET @bulletContent = "hazelcast-hibernate5 (devOpsHazelcast);Kubernetes Discovery Plugin for Hazelcast (devOpsHazelcast);"
      SET @bulletRS = BuildRowSetFromString(@bulletContent,";")
      FOR @i = 1 TO Subtract(RowCount(@bulletRS),1) DO
        ]%%
        <li>%%=Field(Row(@bulletRS,@i),1)=%%</li>
        %%[
      NEXT @i
    ]%%
</ul>
Thanks

Outputs this content:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .