Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custome Function: How to write a count function

Featured Replies

  • 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

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.

  • Author
  • 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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.