Jump to content

Selecting certain records to print ?


This topic is 8160 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I am VERY new at FileMaker (use version 4.0 for windows). I have a database which contains the fields "FirstName" and "SpouseName" and have created two different layouts for printing mailing labels.

Layout #1:

<<Firstname>> and <<SpouseName>> <<LastName>>

<<Address>>

<<City>>, <<State>> <<ZipCode>>

is designed for printing mailing labels for records which contain data in both the "FirstName" and "SpouseName" fields and contains the word "and" to seperate the two fields on the mailing label. (i.e. Linda and Randal McCurry)

Layout #2:

<<Firstname>> <<LastName>>

<<Address>>

<<City>>, <<State>> <<ZipCode>>

is designed to print labels a single individual (i.e. Robert McCallister)

I have worked for several hours to develope a script which would find records based on if the "SpouseName" field was empty or not and use the appropriate Layout to print the mailing labels.

If I use Layout #1 and print I get "Robert and McCallister" on the mailing labels for the records in which the <<SpouseName>> field is empty and if I use Layout #2 I am unable to create mailings labels addressing both parties.

I assume/believe that the "Perform Find" script step may be appropriate part of the desired script but (if this is the case), I am unable to figure out the appropriate If Then Else statements need to preform the desired result.

I would appriciate any help in achieving my desired result of finding records based on if the "SpouseName" field was empty or not and use the appropriate Layout to print the mailing labels.

Thanks,

Russell Atchley

[email protected]

[ December 16, 2001: Message edited by: Russell Atchley ]

Link to comment
Share on other sites

I would take a different approach and make the first line of your label a calculated field. Define a new field:

Line1 (calculation, text) =

Case(NotIsEmpty(SpouseName), FirstName & " and " & SpouseName & " " & LastName,

FirstName & " " & LastName)

The only label layout required will then look like:

<<Line1>>

<<Address>>

<<City>>, <<State>> <<ZipCode>>

If you have other cases of names that must be handled (two people with different last names?) you can alter the calculation to suit. Learning about scripting and finds is still a good thing to do, just not the best solution for this problem.

-bd

Link to comment
Share on other sites

This topic is 8160 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.