0

I use the following AMP to decide which contentblock I want to show.

%%[

    /* UTM code genereren */
    SET @Huidig_Pakket  = AttributeValue("Huidig_Pakket")
        
    /* Kies en koop */
    ELSEIF @Huidig_Pakket == "Kies & Koop"           THEN
        SET @Pakketblok                 = 429704
        SET @Pakketblok_01              = 429737
        SET @Pakketblok_02              = 429737
        SET @Pakketblok_03              = 430259

    /* Geld en Recht */
    ELSEIF @Huidig_Pakket == "Geld & Recht"          THEN
        SET @Pakketblok                 = 429704
        SET @Pakketblok_01              = 429737
        SET @Pakketblok_02              = 429737
        SET @Pakketblok_03              = 430259
        
    ENDIF
    ]%%

In the email I use code below to show the content piece.

%%=BeginImpressionRegion("Pakketblok_03")=%% %%=ContentBlockById(@Pakketblok_03)=%% %%=EndImpressionRegion("Pakketblok_03")=%%

But for some categories (these are only a few examples, the original version is more extended) I don't want to show a thing. So it must not show the contentblock. I tried SET @Pakketblok_03 = NULL , but it doesn't work, does anybody know how this works?

4
  • BeginImpressionRegion doesn’t display anything, it’s just for reporting. Can you clarify what exactly needs to happen and under what conditions?
    – zuzannamj
    Oct 14 at 19:33
  • The AMP works perfectly if I fill in all the codes (SET @Pakketblok_03 = 430259), but this is only partly the script. For some I want to empty the block (SET @Pakketblok_03 =), but then I get an error. So how can I show at some places a @Pakketblok_03 and at some I don't.
    – Anne
    Oct 15 at 6:28
  • You need to add the full script for us to be able to help you with that
    – zuzannamj
    Oct 15 at 6:45
  • I found a solution! I added a HTML block with only a comment in there, so it won't show anything in the email. The ID of that contentblock I used for the parts that I don't want to show any block.
    – Anne
    Oct 15 at 7:03
-1

I found a solution! I added a HTML block with only a comment in there, so it won't show anything in the email. The ID of that contentblock I used for the parts that I don't want to show any block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.