ActiveCampaign Forum

Can I insert a Field into an Email, with a Fallback option?

Dear %FirstName%

But if there is no value for FIRSTNAME then set it to something else, maybe “friend”

Or even better:

If %FirstName% THEN “Hi %FirstName%,” ELSE “”

so they get either:

Hi Bob,
or
nothing

Found answer on Forum:

%IF $FIRSTNAME != ‘’%
Hi %FIRSTNAME%,
%ELSE%
Hi,
%/IF%

1 Like

Hi @bungalowsoftware,

If you go to the “Forms” page and then click in the top left “Manage Fields” you can add/edit a different value or default value if there is no, for example, %FIRSTNAME% associated with the contact.

You would get there by clicking “Edit” in the specific field name row. You will then be given the option to add a “Default value”. See image below for an example.

Let me know if you need any more help, thanks,

Perry

1 Like

I haven’t yet tested the solution @bungalowsoftware posted above but it looks neat and I wonder why it’s not shown in the docs as an alternative to setting a default value. Having only one default values for a firstname for example is a bit unhandy as you Probably want to change it on every campaign depending on the context.

Good to know there’s the if/else way in the template. I’m gonna try that out.