If field contents are empty, don't display

If field contents are empty, don't display

Post by Earlmak » Sun, 26 Mar 2000 04:00:00



Hi All,

I have a field called PHOTOGRAPHER in an FMP database.  Sometimes there is not
a Photographer listed for a particular photograph, so that when I'm printing
labels for the photographs, that has text that says PHOTO BY, I don't want the
label to say:

Photo by: [empty, blank space]

How and where would I make a calculation so that if that field doesn't contain
any information, don't print the words PHOTO BY?

Actually, I've got the same problem in the DATE field, if it's empty, I don't
want to have the words DATE appear in the label.

Thanks All,
Earl

 
 
 

If field contents are empty, don't display

Post by Jim Krame » Sun, 26 Mar 2000 04:00:00



Quote:> Hi All,

> I have a field called PHOTOGRAPHER in an FMP database.  Sometimes there is
not
> a Photographer listed for a particular photograph, so that when I'm
printing
> labels for the photographs, that has text that says PHOTO BY, I don't want
the
> label to say:

> Photo by: [empty, blank space]

> How and where would I make a calculation so that if that field doesn't
contain
> any information, don't print the words PHOTO BY?

> Actually, I've got the same problem in the DATE field, if it's empty, I
don't
> want to have the words DATE appear in the label.

> Thanks All,
> Earl

Earl,

There are a couple of ways to do this.

Make the label (in your case the words "Photo By" and "Date")  calculated
fields or part of calculated fields and not text.

For instance, you could use a calculated field (LabeledPhotographerCalc, set
to Text) something like:

If(IsEmpty(Photographer),"","Photo By: " & Photographer)

Use the LabeledPhotographerCalc field (instead of the Photographer field) on
your labels or reports.  You can figure out other possible variations of
this..

The IsEmpty function is quite handy for just the situation you are dealing
with on reports and labels.

Jim


 
 
 

If field contents are empty, don't display

Post by Maire Bla » Mon, 27 Mar 2000 04:00:00



> Hi All,

> I have a field called PHOTOGRAPHER in an FMP database.  Sometimes there is not
> a Photographer listed for a particular photograph, so that when I'm printing
> labels for the photographs, that has text that says PHOTO BY, I don't want the
> label to say:

> Photo by: [empty, blank space]

> How and where would I make a calculation so that if that field doesn't contain
> any information, don't print the words PHOTO BY?

> Actually, I've got the same problem in the DATE field, if it's empty, I don't
> want to have the words DATE appear in the label.

If(isEmpty(Photographer),"","Photo by: " & Photographer)

Use this field on your layout. It prints the whole thing including the
photographer's name if there is one, or nothing if not. If this comes in
the middle of other stuff, you can make it slide left (and up if
appropriate) so that if there is no photographer, no blank space is left
either.
--
Mire Black