Jump to content
Welcome to the new FusionPro User Forum! ×

Empty field yields poor grammar!


Recommended Posts

So here's the deal. Every week the client sends a new data file with a new problem, apparently to keep me on my toes.


This week's fun is as follows:


Recipient's first name has several empty fields. Somewhere in the text appears this paragraph:


Steve, may I suggest you look into financial....mumbo....jumbo...etc..etc..


"Steve" is a rule, to force it to proper case. The remainder of the paragraph is typeset into the text box.

Now, when the recipient's name comes in with their data file empty, it looks pretty crappy:


, may I suggest you look into more mumbo jumbo...etc..etc....


It's all well and good to just create a rule (and by create, I mean copy an existing one) that will remove that comma. But this presents a problem with the word "may". If I create a rule that says to remove the comma, and insert the capitalized version of the word "may", that's cool - but the next record will wind up being populated, so it'll say:


"Steve, May may I suggest..."


This is what I have so far:


var Var1 = "RecipientFirstName";


firstName = Field(Var1);

if (Trim(firstName) == "" ){

return "";


return ToTitleCase(Trim( '' + Field(Var1) + ","));



So the question would be, how could I remove the word "may" from the textbox in the event the field IS populated, yet keep it there for when it's not?

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...