dfarrellyallegranj.net Posted October 15, 2008 Share Posted October 15, 2008 Hi all I am not experienced in java so i need a little help. I am trying to work with a letter where the database has a lot of first names that only have one character. I want the letter to say, "Dear <First>:" But in cases where the first name field contains only one character i would like it to say, "Dear <First> <Middle> <Last>:" Does anyone have a rule that will do something like this? Any help you could offer me would be greatly appreciated. Thanks Devin Link to comment Share on other sites More sharing options...
Dan Korn Posted October 20, 2008 Share Posted October 20, 2008 Try something like this in a JavaScript (not Java!) rule: if (Field("First").length < 2) return "Dear " + Field("First") + " " + Field("Middle") + " " + Field("Last") + ":"; //else return "Dear " + Field("First") + ":"; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.