DCurry Posted February 10, 2009 Share Posted February 10, 2009 I could use some help creating a rule that does the following: My letter contains a sentence that reads "But keep reading, <<name>>." My customer wants me to make it so that if the name variable returns a certain value ("Friend") the sentence will instead read "But keep reading." All other values of the variable will return the name. My problem is how do I get rid of the comma and the space after "reading" in this instance, yet keep it for all other values? Thanks in advance! Link to comment Share on other sites More sharing options...
Hadrian Posted February 10, 2009 Share Posted February 10, 2009 Simple version. Assuming that the field that it looks at is named "Name" then a simple version would be. if(Field("Name") != "Friend") return "But keep reading" + " " + Field("Name") + "." else return "But keep reading." Link to comment Share on other sites More sharing options...
Hadrian Posted February 10, 2009 Share Posted February 10, 2009 woops forgot the comma. if(Field("Name") != "Friend") return "But keep reading," + " " + Field("Name") + "." else return "But keep reading. Link to comment Share on other sites More sharing options...
DCurry Posted February 10, 2009 Author Share Posted February 10, 2009 Awesome - that helps a lot. It's a little different than what I wanted to do, but I was able to modify it to suit my needs. I really appreciate your help! Link to comment Share on other sites More sharing options...
Hadrian Posted February 10, 2009 Share Posted February 10, 2009 As i mentioned, this was the simple method. Were there more instances involved or what exactly did you prefer? Link to comment Share on other sites More sharing options...
DCurry Posted February 10, 2009 Author Share Posted February 10, 2009 Simple is good! I was able to use yours as a template and simply modify it ever-so-slightly to accomplish my task. My customer is happy, so I am happy. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.