Skip to main content

I'm learning AMP Script and I need to compare a variable with different countries and I'm wondering if, as dynamic block in Marketing Cloud, is it possible to compare a variable with different values. For example:

%%[IF @value == 'Spain, France, Canada' THEN]%% %%=ContentBlockByName(@test)=%% %%[endif]%%

%%[IF @value == 'Spain, France, Canada' THEN]%%
%%=ContentBlockByName(@test)=%%
%%[endif]%%

In addition, is it possible to do something similar to:

%%[IF @value1 == Spain OR @value2 == 'Latin America' THEN]%% %%=ContentBlockByName(@test)=%% %%[endif]%%

%%[IF @value1 == Spain OR @value2 == 'Latin America' THEN]%%
%%=ContentBlockByName(@test)=%%
%%[endif]%%

Thank you so much, Anna

I'm learning AMP Script and I need to compare a variable with different countries and I'm wondering if, as dynamic block in Marketing Cloud, is it possible to compare a variable with different values. For example:

%%[IF @value == 'Spain, France, Canada' THEN]%% %%=ContentBlockByName(@test)=%% %%[endif]%%

In addition, is it possible to do something similar to:

%%[IF @value1 == Spain OR @value2 == 'Latin America' THEN]%% %%=ContentBlockByName(@test)=%% %%[endif]%%

Thank you so much, Anna

I'm learning AMP Script and I need to compare a variable with different countries and I'm wondering if, as dynamic block in Marketing Cloud, is it possible to compare a variable with different values. For example:

%%[IF @value == 'Spain, France, Canada' THEN]%%
%%=ContentBlockByName(@test)=%%
%%[endif]%%

In addition, is it possible to do something similar to:

%%[IF @value1 == Spain OR @value2 == 'Latin America' THEN]%%
%%=ContentBlockByName(@test)=%%
%%[endif]%%

Thank you so much, Anna

Source Link

Is it possible to compare multiple values in AMP Script?

I'm learning AMP Script and I need to compare a variable with different countries and I'm wondering if, as dynamic block in Marketing Cloud, is it possible to compare a variable with different values. For example:

%%[IF @value == 'Spain, France, Canada' THEN]%% %%=ContentBlockByName(@test)=%% %%[endif]%%

In addition, is it possible to do something similar to:

%%[IF @value1 == Spain OR @value2 == 'Latin America' THEN]%% %%=ContentBlockByName(@test)=%% %%[endif]%%

Thank you so much, Anna