Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

I need to make a script which prints labels from a contact database, but the problem is some records have 2 or more contact persons per company, and a label with each of the persons has to be printed. Is there an easy way to do this?

tnx,

wim

Posted

There are two ways to do this.

The hard way, (but better) would be to split your contact database into two files. One for Companies, and another for Contacts (people). That way each person in the system would have their own record -- allowing you to print them all easily.

The easy way (but not as sound structurally), is to make sure you system can tell if a second person exists for a company. I suggest using a separate field for the second person. You can either script the system to check the second person field when printing, and if something's there, to print another label for them,

OR

If you're printing labels off of a sheet, create a concatenated 'label' field that shows the first contact (name, address, city, st, zip, etc), and (if the second contact exists) the second contact info underneath it.

Place this label fields on your layout, and make it deep enough to print two labels, BUT set the field to slide up, AND also reduce size of enclosing part.

The first option is definitely better, but if you don't like the prospect of using two tables, the second option will work.

HTH

Posted

Hey Wim,

Here are several answers/ideas. I hope they're helpful.

1) Splitting up the system into two files (one for Companies, and one for Contacts) will a) solve your label printing issue, B) make your system faster, c) make your system more expandable, and c) easier to maintain.

Splitting it up will require you relating the two files, one Company can have many Contacts -- and so if this is not something you're familiar with yet, it will require a short learning curve -- but, well worth it.

2) Is to keep it all in one file, and tweak a 'label' field in it to calculate its contents based on how many contacts you've entered per record. This is possible, but somewhat difficult to explain and implement. I was going to do so here, but quite honestly, you're much better off splitting the system into two files. One for the Companies, and one for the Contacts. Then, printing mailing labels for the contacts in the system becomes very easy indeed.

I don't remember where the chapter on relational files is in the FMP manual, but if you have a minute, check it out. Also, FMP provides templates on their CD (and online too I believe) that do what you're requesting already. Check those out too, and just tweak them as needed. Finally, I think there are some simple related-file examples in the Sample Files section of FM Forums.

I know this isn't the answer you were looking for (sorry about that), but it is the best way to do what you're asking about. HTH

Posted

If you want a quick and dirty solution... you could have a different layout for 1, 2, 3, or even more contacts.

I'm not sure I understand how you are entering these additional contacts... but you could set up a script to test whether or not there are those additional contacts. Then, if there is one contact go to labels layout 1, if there are two then go to labels layout 2, etc.

  • Newbies
Posted

Sharka and Jason,

thanks again for the input, I'll go for the splitting up after all. it's just that I thought the label thing would be a minor addition to my program, I was only told there would be more contacts per record after I defined my time estimation for this programming, so time is up and I was hoping for a quick solution.

tnx, love this board...

wim

This topic is 8017 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.