Text Expansion Issue with Conditional Statements in FastKeys for Digital Marketing Email Templates

Share your favorite FastKeys commands
Post Reply
tonyrm06
Posts: 3
Joined: Oct 15th, ’23, 17:42

Post by tonyrm06 » Oct 15th, ’23, 17:51

Hello everyone,

I'm facing an issue with text expansion in FastKeys that's affecting my digital marketing job. I'm trying to use conditional statements to personalize email subjects based on the recipient's first name. The idea is to replace %CLIP_1% with a specific email subject line.

Here's the code snippet I've been using:


<% if ( recipient.firstName != "" ) { %><%= recipient.firstName %>, %CLIP_1% <% } %><% else { %> %CLIP_1% <% } %>
However, FastKeys is deleting the curly braces {} and thus, the snippet doesn't work as expected. Here's the problematic line for clarity:


<% if ( recipient.firstName "" ) %><%= recipient.firstName %>, title <% %><% else %> title <% %>
Has anyone faced a similar issue or does anyone know how to solve this?

Thank you in advance for your help!
User avatar
Marko
Posts: 1803
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Oct 15th, ’23, 20:32

Braces have a special meaning in FastKeys and need to be enclosed in braces:
{ = {{}
} = {}}
tonyrm06
Posts: 3
Joined: Oct 15th, ’23, 17:42

Post by tonyrm06 » Oct 15th, ’23, 20:40

Thank you very much Marko, it's working now. I thought it had no solution, and it's something I use quite a bit at work
Post Reply