Jump to content

I need blank fields to not print.


Fletch

Recommended Posts

I'm placing variable mailing information into a letterhead. Some of the records do not have any information in some of the fields. (ie. business name) When one of the records is like this, I want FP to 'Not' leave a blank space where the variable information for that particular field is located. In addition, I have a 'comma' set to be between my city and state fields. Some of my records do not include city and state, but FP still prints the comma. Can this be set to not happen?
Link to comment
Share on other sites

Woot! I think I can answer this one. :)

 

I'm placing variable mailing information into a letterhead. Some of the records do not have any information in some of the fields. (ie. business name) When one of the records is like this, I want FP to 'Not' leave a blank space where the variable information for that particular field is located.

After setting all your variable elements, select everything in the Variable Text Editor window, click on the Paragraph... button, and check the box for "Suppress if: <empty>."

 

In addition, I have a 'comma' set to be between my city and state fields. Some of my records do not include city and state, but FP still prints the comma. Can this be set to not happen?

For this scenario, I have a recurring rule that I use:

if (Field("CITY") == "" && Field("ST") == "" && Field("ZIP") == "") {
  return "";
  }
else return Field("CITY") + ", " + Field("ST") + " " + Field("ZIP");

With this code and the "suppress if empty" check above, this line in my variable text box will drop out if the fields are empty.

Link to comment
Share on other sites

if (Field("CITY") == "" && Field("ST") == "" && Field("ZIP") == "") {
  return "";
  }
else return Field("CITY") + ", " + Field("ST") + " " + Field("ZIP");

Or, in light of what I learned today in a different thread, you could also use the following:

var CityStZip = (!Field("City") && !Field("St") && !Field("ZIP+4")) ? "" : Field("City") + ", " + Field("St") + " " + Field("ZIP+4");
return CityStZip;

:D

Link to comment
Share on other sites

I got it! I didn't 'Highlight' all the fields before I selected the 'Supress- command. All is good now.

 

Thanks for the great information.

 

 

I actually wish this would automatically be checked on text boxes and the users that don't want this would have to go and "un-check" it.:D Saves an extra step on standard address blocks, such as address line 2.

Link to comment
Share on other sites

I actually wish this would automatically be checked on text boxes and the users that don't want this would have to go and "un-check" it.:D Saves an extra step on standard address blocks, such as address line 2.

Right, but then whenever anyone intentionally typed a blank line, such as to separate paragraphs, it would automatically be suppressed, with no obvious explanation. I can't imagine all the calls we'd get about that.

Link to comment
Share on other sites

Right, but then whenever anyone intentionally typed a blank line, such as to separate paragraphs, it would automatically be suppressed, with no obvious explanation. I can't imagine all the calls we'd get about that.

 

I was thinking more along the lines of "empty" data cells but hear ya on that it would probably be more of a problem with it checked.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...