Jump to content

Custome Function: How to write a count function


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

Recommended Posts

  • Newbies

I am a newbie in File Maker Pro. I am using FMP6 on Mac OSX Panther. I am designing a billing system for friend in a creative business. In his invoice, he needs a field against the name of his client indicating how many invoices he has raised for that particular client.

For example if my friend has raised 10 invoices (4 on TOM, 2 on DICK, 3 on HARRY and 1 on GEORGE) and the eleventh invoice is raised on GEORGE, Then in this invoice my friend wants GEORGE-2 indicating that he has raised two invoices on GEORGE so far or if the eleventh invoice is on TOM then the field should indicate TOM-5 indicating that he has raised 5 invoices on TOM so far.

Can this be done? Pls help me

Warm regards

Krystal

Goa, India confused.gif

Link to comment
Share on other sites

FYI, Custom Function means something different in FileMaker 7. What you want is an auto-enter text field or a script that sets a text field with this formula:

Client & "-" & Count( relation::invoice ID )

...where "relation" may be slightly different depending on if you're doing this from the client file or the invoices file. In either case, you would be relating Client ID to Client ID.

Link to comment
Share on other sites

  • Newbies

Dear Fitch

Your suggestion was brilliant! You wouldnt know how many cartwheels I have done after your solution. The final calculation I have have taken is:

Count( SphinxBILL::client )

where SphinxBILL is the name of the file and client is the name of the field where we enter the client name. I got what I wanted ..which is how many invoices have been raised on that particular client.

Once again thanks a lot, Fitch.

I really love this forum!

Warm regards

Krystal

smile.gif

Link to comment
Share on other sites

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