I'm trying to create a simple script in Velocity which will use the ZIP code provided by a person who fills out a form to assign a rep. Ideally, it will run the ZIP through several arrays of postal codes to find the correct rep to assign. Here's an example of what I've written:
#set( $robb = ["11111", "111", "111111"] )
#set( $notrobb = ["1111111111", "1"])
#foreach ($lead.PostalCode in $robb)
Robb
#end
#foreach ($lead.PostalCode in $notrobb)
Not Robb
#end
I put this in an alert email. When I test, this is what I see in the email:
Rep Name: Robb Robb Robb Not Robb Not Robb
Robb Barrett