342 Views    -    3 Replies


Username Post: Selecting Individual or Company data for invoices        (Topic#213721)
Your continued generosity and support of FMForums is greatly appreciated.
AndyCan 
enthusiast
Posts: 51

Post Rank (AVG):
            


FMP: 9
OS: Mac OS X Leopard
Skill: Novice



Tweet This! Tweet This Post!
03-09-10 03:12 AM - Post#352020     - Post Rank:             


Good morning everyone. I have what is probably a very basic question to answer, but i'm a bit confused as to where to start.

Basically i am developing a small db to manage freelance design work, with projects, project stages, clients (individuals or companies) and an invoice functionality.

My question is: How do i automatically populate the client details in the invoice when the client could be either a company or an individual. I would like to separate companies and individuals into two different tables and not just mix everything into a single client table.

For example, supposing i could figure out a way for the database to detect whether my client is an individual or a company - possible with a radio box - how would i then selectively populate the information in the invoice. A company will have a registration number, whereas an individual will not. Is it possible to also use conditional labels that do or do not appear based on the type of client?

Thanks for your help! If this has already been addressed in another post, please forgive me for not having seen it and pass me a link.

Andy.










AndyCan 
enthusiast
Posts: 51

Post Rank (AVG):
            


FMP: 9
OS: Mac OS X Leopard
Skill: Novice



Tweet This! Tweet This Post!
03-09-10 05:49 AM - Post#352029     - Post Rank:             
    In response to AndyCan

To follow up my previous question, I found a useful method in another post that involves setting up labels with calculation fields using text concatenation. So now i have two calculation fields - one with all the company details as they would appear in an invoice and another with all the individual details as i would like them to appear.

Now it's just a case of placing one of the two fields in my invoice. I'm still not sure how to do this. I thought of having two different invoice templates, but that doesn't seem to be a very elegant solution.

At the moment i have both company details and individual details in a single CLIENT table and a radio button with a boolean value stating whether it's a company or not. I still think it would be better to normalise this and have separate INDIVIDUAL and COMPANY tables and maybe populate the CLIENT table with the appropriate foreign keys.

At least for now i have found a more elegant way to add just a single field to the invoice with all the label information, but i would still appreciate peoples thoughts on the general structure and if i'm going in the right direction or not.

Thanks again!

Andy.










Fitch 
Imaginary friend
Posts: 3194
Fitch

Loc: Portland, Oregon
Post Rank (AVG):
            


FMP: 11 Advanced
OS: Cross Platform

Member: TechNet
Skill: Expert

Certified:
     

 FMPug

Tweet This! Tweet This Post!
03-09-10 09:35 AM - Post#352053     - Post Rank:             
    In response to AndyCan

You could use conditional formatting to hide/show the appropriate fields, or you could put each field on its own tab panel and go to the right tab when you go to the layout -- ideally with a script trigger, but your profile says FM9.

If you're calculating the label though, why use two fields?

Case( Boolean ; company label ; individual label )
Tom Fitch :: Portland, Oregon :: Fitch & Fitch: FileMaker consulting











Your continued generosity and support of FMForums is greatly appreciated.
AndyCan 
enthusiast
Posts: 51

Post Rank (AVG):
            


FMP: 9
OS: Mac OS X Leopard
Skill: Novice



Tweet This! Tweet This Post!
03-09-10 10:29 AM - Post#352061     - Post Rank:             
    In response to Fitch

  • Quote:
Case( Boolean ; company label ; individual label )



Many thanks Tom. That was exactly what was needed. Now i just have one single calculation field with a case function that chooses the correct texts for the label depending on whether it is a company or and individual.










Icon Legend Permissions Topic Options
Print Topic

Email Topic

342 Views
Welcome Guest...
Enter your username and password to login. If you do not have a username you can register one here

Username

Password

Remember me. Help



Forgot Password...


Quick Links
Recent Posts
Active Topics
No Replies
Recent Files
Functions & Scripts
FileMaker Pro Help
FileMaker on Twitter
FileMaker Marketplace

Custom Search

Find FileMaker Developers

Don't have time to wait,
hire a developer now!

Recent Members
Welcome them to our community!
Find FileMaker Jobs

Want a new career?
Find your new job now!

Joy of Tech
Latest Joy of Tech!

Recent Topics
Recent Hot Topics
Contribute
With your generosity we can make some real magic happen!. Support your favorite online FileMaker community...
FM Forums.com


Click here...


Or a Donation of any amount.


Thanks for your support!

Active Blogs
0 Recent blogs:
People to Post Lately in this Topic
AndyCan
Fitch
FM Forums Advertisers


FusionBB™ Version 3.0 FINAL | ©2003-2010 InteractivePHP, Inc.
Execution time: 0.214 seconds.   Total Queries: 61   Zlib Compression is on.
All times are . Current time is 09:02 AM
Content ©1996-2008 Ocean West Consulting, Inc. All Rights Reserved
Ocean West Consulting, Inc. can not and will not be held responsible for any of the contents in this site.
FM Forums™ is a trademark of Ocean West Consulting, Inc an independent entity, not affiliated with FileMaker Inc.
FileMaker® is a registered trademark of FileMaker Inc.
Top