Pulling Address from Company record

Notes on the new SeedCode Complete template for FileMaker 13
Posts: 129
Joined: Tue Jul 15, 2008 12:41 am
Location: Perth Western Australia
PostPosted: Wed Jan 20, 2016 1:01 am
Hi John,

another question: When I now enter new contacts, ie all our staff records, each one will get the company address as the main address. Even so I added the company link I still have to add the address for each record manually.

So if the company would move, I would need to update each staff members address manually.

Is there a reason why the address hasn't been linked when a company is added?

Thanks

Kind regards

Regine
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Jan 20, 2016 2:59 pm
If you want all these contacts to just use the company address, why don't you simply not add an address for the contacts? The idea being that they don't each have their own address but use the company address. The address of the company is still available as an address you can select from when you create an invoice for the contact, of example.

And if you need the company-address-of-a-contact, you can always create a calc field for it in the contact's record.

That seems simpler than trying to loop through all a company's contacts each time you change the company's address--though you could script that too if that's really how you'd like it to behave.

Hope that helps,

John
John Sindelar
SeedCode
Posts: 129
Joined: Tue Jul 15, 2008 12:41 am
Location: Perth Western Australia
PostPosted: Tue Jan 26, 2016 11:51 pm
Thanks John,

In case somebody else is interested I solved it by adding a tick box above the address field "Use Company Address".

I changed the Contacts::AddressBlock field to draw the company address, if the box is ticked and I amended the script "Populate Related Contact Info from Primaries" in the Check Address If clause to:

not IsEmpty ( Contact::AddressBlock ) and IsEmpty ( Contact::AddressUseCompany )

so that it doesn't create an empty address record.

I will use the Contacts::AddressBlock for fmSpark letters, so that's why I wanted it there.

Thanks

Kind regards

Regine
SeedCode Staff
SeedCode Staff
Posts: 190
Joined: Tue Sep 22, 2015 2:27 pm
PostPosted: Wed Jan 27, 2016 12:14 pm
Hi Regine,

Sounds like you arrived at a great solution for this. Thanks so much for sharing this on our forum! Keep us posted with any other questions.

All the best,

Dan
[email protected]

Return to SeedCode Complete 13

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: