strido Posted August 9, 2012 Share Posted August 9, 2012 I have a rule for the recipient's name that is inserted at the beginning of a sentence, to make it proper case: var Var1 = "RecipientFirstName"; return ToTitleCase(Field(Var1))+","; However, it seems that field is empty from time to time, causing the sentence to begin with a comma, then the word "space". I'd like to add to that rule above, with another rule that says if RecipientFirstName is empty, return only the word "Space" I should know this by now.... Quote Link to comment Share on other sites More sharing options...
step Posted August 9, 2012 Share Posted August 9, 2012 return (Field("RecipientFirstName") != "") ? ToTitleCase(Field(Var1)) + "," : ""; Quote Link to comment Share on other sites More sharing options...
strido Posted August 9, 2012 Author Share Posted August 9, 2012 That's close, but now when it IS populated it only returns the rule name, not the actual recipient's first name. I need it to say Strido, space is limited But if that first name (strido) is missing, it returns: Space is limited Quote Link to comment Share on other sites More sharing options...
scubajbc Posted August 9, 2012 Share Posted August 9, 2012 (edited) return (Field("RecipientFirstName") != "") ? ToTitleCase(Field("RecipientFirstName")) + ", " : ""; Edited August 9, 2012 by scubajbc Quote Link to comment Share on other sites More sharing options...
strido Posted August 10, 2012 Author Share Posted August 10, 2012 Thanks guys! Quote Link to comment Share on other sites More sharing options...
step Posted August 13, 2012 Share Posted August 13, 2012 I'm assuming you deleted this line of code that defined "Var1" when you added mine: var Var1 = "RecipientFirstName"; I'm sorry – it probably wouldn't have hurt for me to specify ha. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.