Jump to content

with the "Surpress if empty" feature


rlinder

Recommended Posts

I've attached a pdf with screen captures that better displays what I'm running in to. The problem is with the Fax paragraph. When I use Surpress if Empty, the paragraphs above do not move down when the DIR Fax fields are not populated. A space is there and it doesn't look right. I'm using FP version 4.1 and tried a rule along with Surpress with no luck.

(See Attachment)

 

Thanks in Advance,

 

Richard

Link to comment
Share on other sites

Guest Unregistered

This is a known issue with Microsoft Excel:

http://support.microsoft.com/default.aspx?scid=77295

 

I realize this may sound like I'm blaming Microsoft for what appears to

be an issue in FusionPro, but if you do a Google Groups search for

"Excel missing commas", you will see that this issue hits users of a lot

of different data-driven applications. Unlike an actual database, Excel

does not make a distinction between a missing field and a field which

happens to contain an empty value. Therefore, it doesn't ensure that

all the field delimiters are present for each record when you export to

a CSV or tab-delimited file. So, caveat emptor with using Excel as a

database.

 

You can do what that Microsoft article suggests to make Excel output all

the field delimiters. Or you can Edit

Flat File Data dialog. Another workaround in FusionPro is to create a

rule with the same name as the field which simply returns the field.

Yet another is to use the "Suppress if containing empty variables"

feature in the Paragraph Settings.

Link to comment
Share on other sites

Richard,

 

Youu are not able to use the "Suppress if Empty" for your specific situation becuase you have two variables on the same line ("Dir" and "Dir Fax"). These are two separate variables which both, neither or either one could be populated. This sinle rule will not work since "Suppress if Empty" implies if anything is missing - leave everything off.

 

The simplest method that I would use to do this would be to create a rule which is blank to begin with, then add the "Dir" variable only if it is present, then add the "Dir fax" only if it is present. You would need to create another if statement check in the rule as well to check if both are present to put a space between them, and if neither are present, return a blank "".

 

try somethig like this...

 

var dirOut = "";

if (Trim(Field("Dir")) != "") {

...dirOut += "Dir " + Field("Dir");

}

if (Trim(Field("Dir Fax")) != "") {

...if

Link to comment
Share on other sites

Sorry, but this posted itself before I was done with it.

 

To continue...

 

try somethig like this...

 

var dirOut = "";

if (Trim(Field("Dir")) != "") {

...dirOut += "Dir " + Field("Dir");

}

if (Trim(Field("Dir Fax")) != "") {

...if (dirOut != "") {

......dirOut += " Dir Fax " + Field("Dir Fax");

...}

...else {

......dirOut += "Dir Fax " + Field("Dir Fax");

...}

}

return dirOut;

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...