Brian Dunning's FileMaker Custom Functions

suffixPlural ( theNumber )

Given any number, this function returns the letter "s" if the number is equal to 1, otherwise nothing is returned.

  Average rating: 3.9 (31 votes) Log in to vote

Michael Richards   Michael Richards - Show more from this author
itraining
http://www.itraining.com.au

Share on Facebook Share on Twitter

  Sample input:
suffixPlural ( -1 )
suffixPlural ( 0 )
suffixPlural ( 0.5 )
suffixPlural ( 1 )
suffixPlural ( 2 )
  Sample output:
s
s
s

s

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Consider using a quantity field in an invoicing situation. The invoice provides improved human readability if the units display the plural "s" where appropriate.

For example:
0 hours
1 hour
1.5 hours

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: