Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Email header masks

Avatar

Avatar
Boost 3
Level 1
ChristineVea
Level 1

Likes

3 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Level 1
ChristineVea
Level 1

Likes

3 likes

Total Posts

4 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile
ChristineVea
Level 1

20-12-2019

I am loading personalized mask values for "from name", "reply to address" and "reply to name" & have been able to reference the additional data to populate these values in place of the defaults.   My dilemma is that my client wants to populate with the personalized masks where they are not null and populate with defaults where null. 

I *think* I need to create new content blocks for these but don't know how to create a content block for temp workflow data...  can I write the  if statement with
If ((targetData/fieldname) is empty, 'default content block',(targetData/fieldname)) ??

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Level 3
chan2111
Level 3

Likes

21 likes

Total Posts

59 posts

Correct Reply

6 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 3
Ignite 1
View profile

Avatar
Give Back 5
Level 3
chan2111
Level 3

Likes

21 likes

Total Posts

59 posts

Correct Reply

6 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 3
Ignite 1
View profile
chan2111
Level 3

08-01-2020

yes you can build your logic in content block as

 

<%

var fieldName = context.targetData.target.fieldname;

var defaultValue = ‘default’;

%>

<%

if (fieldName.length > 0) {%>

   <%=fieldName%>

<%}

else {%>

  <%=defaultValue%>

<%}

%>

 

Please try this out and let me know.

 

 

 

Answers (0)