Badges
Accepted Solutions
Likes Received
Posts
Discussions
Ideas
Blog Posts
I'm new to Velocity Scripting, but I want to make a script that generates the name of the newsletter someone has just subscribed to.Basically whichever trigger fired off the email (a new subscriber was submitted) I want to use the updated subscription field to insert the newsletter's name. I've no c...
Field is checked off in the script editor. I added the current error to the original post and updated the code to the current version that still doesn't work.
I've tried double equal, with and without parentheses, double equals everywhere and just at the top. It just won't work.
Ok, I modified it and it still causes an error...#if ( $lead.TrendlinesSubscription = "1" ) #set ( $subtrendslines = "Trendlines" )#else #set ($subtrendslines = "")#end${subtrendslines}
Oh, ok. Well that would be why True isn't working. Thank you!
Edited for current code: We have several newsletters and I've been trying to get a script working that checks if someone is subscribed and if so lists the newsletter name. For some reason I just can't get it to work even though this script is identical (except for the field used) to others I'm using...
Ah ok, I didn't know the meaning, that explains a lot. Written that way it actually simplifies my script. Thank you so much, I'm running with this!
Oh wow, I think that's it, I thought it was if that field was empty then, else...
Yes, the boxes are checked (although I didn't know that was required so helpful for the future). I just edited my question so it should show as code now.
First I'll say I've already received significant help from many people here on getting my toes wet in velocity scripting. Here's some I adapted for my purposes (that other's shared) and I somehow broke:The point of this is to only show the token data if they have a city in the system:#if( !$lead.Cit...