Jump to content

  •  

UPGRADE DEADLINE - SEPTEMBER 26, 2014!
FileMaker Inc. has a deadline for users of version 10,11, 12 as Individual box or volume licenses (with expired maintenance).
If you don't renew your maintenance and upgrade to FMP 13 you will no longer be eligible to upgrade, at the discount pricing.

Volume Licensing upgrade pricing for FileMaker Pro 13, FileMaker Pro 13 Advanced and FileMaker Server 13 will be discontinued.
Individual upgrade pricing for FileMaker Pro 13 and FileMaker Pro 13 Advanced will increase after September 26, 2014.
As of 27-September-2014, FileMaker 10 products will no longer be available for purchase or support.

http://help.filemaker.com/app/answers/detail/a_id/13865


Photo

Singular to plural word calculation


  • Please log in to reply
7 replies to this topic

#1 dmontano  apprentice

dmontano
  • Members
  • 176 posts
  • LocationSouthern California
  • FM Application:11 Advance
  • Platform:Mac OS X Lion
  • Skill Level:Intermediate
  • Time Online: 7h 9m 57s

Posted 04 June 2010 - 05:05 PM

Given the following two sample words:
1. Party
2. Animal

What 1 calculation can be used to make these words plural like this:
1. Parties
2. Animal

I have tried for 30 minutes and I give up.
  • 0

#2 David Jondreau  Huzzah!

David Jondreau
  • Members
  • 1,946 posts
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12, 13
  • Membership:TechNet, FileMaker Business Alliance
  • Time Online: 9d 22h 18m 2s

Posted 04 June 2010 - 06:28 PM

Case( word = "Party"; "Parties"; word = "Animal"; "Animals")

But I suppose your looking for something that will work with any noun.

I doubt that's possible.

What's the bigger picture? Would the Spelling scripting functions help?
  • 0
"I do believe that there are some universal cognitive tasks that are deep and profound - indeed, so deep and profound that it is worthwhile to understand them in order to design our displays in accord with those tasks."
-Edward Tufte

Wing Forward Solutions, LLC
www.wingforward.net

#3 David Jondreau  Huzzah!

David Jondreau
  • Members
  • 1,946 posts
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12, 13
  • Membership:TechNet, FileMaker Business Alliance
  • Time Online: 9d 22h 18m 2s

Posted 04 June 2010 - 06:36 PM

Setting up rules to pluralize each of the following words would be impossible.

dog
knife
data
child
sheep
mouse
news
crisis
potato
memo
elf
dwarf
attorney-general
  • 0
"I do believe that there are some universal cognitive tasks that are deep and profound - indeed, so deep and profound that it is worthwhile to understand them in order to design our displays in accord with those tasks."
-Edward Tufte

Wing Forward Solutions, LLC
www.wingforward.net

#4 comment  consultant

comment
  • Members
  • 24,185 posts
  • Time Online: 329d 6m 13s

Posted 04 June 2010 - 06:45 PM

What 1 calculation can be used to make these words plural



I guess a calculation that would follow these rules:
http://en.wikipedia..../English_plural

Al least the regular plurals shouldn't be too hard to implement.
  • 0

#5 comment  consultant

comment
  • Members
  • 24,185 posts
  • Time Online: 329d 6m 13s

Posted 04 June 2010 - 07:13 PM

Here's something that could serve as a starting point:

Let ( [
len = Length ( word ) ; 
lastChar = Right ( word ; 1 )
] ;
Case ( 

not IsEmpty ( Filter ( lastChar ; "sxz" ) )
or
not IsEmpty ( FilterValues ( Right ( word ; 2 ) ; "sh¶ch" ) ) ;
word & "es" ;

lastChar = "y" and IsEmpty ( Filter ( Middle ( word ; len - 1 ; 1 ) ;  "aeiou" ) ) ;
Left ( word ; len - 1 ) & "ies" ;

word & "s"
)
)

  • 0

#6 dmontano  apprentice

dmontano
  • Members
  • 176 posts
  • LocationSouthern California
  • FM Application:11 Advance
  • Platform:Mac OS X Lion
  • Skill Level:Intermediate
  • Time Online: 7h 9m 57s

Posted 07 June 2010 - 09:47 AM

Hi DJ,

Bigger picture... not very broad. Layouts in solution are based on table (singular name), but layout should be "presented" in plural. I agree it would be impractical for all nouns, but my scope is quite small.

I think your approach of Case would be just fine. I hacked this up before checking responses and it seems to work for now:

If (

Right ( Get ( LayoutName ) ; 1 ) = "y";

Proper (
Substitute (
Get ( LayoutName ); ["_" ; " "] ; [ "y"; "ie"] )
)
&
"s"
;

Proper (
Substitute (
Get ( LayoutName ); "_" ; " " )
)
&
"s"
)

Hi Comment,
Thanks for pitching in. I am going to plug what you've created in to see if I can understand it.

Than you both - much appreciated!
  • 0

#7 dmontano  apprentice

dmontano
  • Members
  • 176 posts
  • LocationSouthern California
  • FM Application:11 Advance
  • Platform:Mac OS X Lion
  • Skill Level:Intermediate
  • Time Online: 7h 9m 57s

Posted 07 June 2010 - 10:05 AM

Hi Comment,

I plugged in the formula and I get a "function not found" and then it highlights the first "not IsEmpty" portion of the formula.

Any ideas what I am missing?
  • 0

#8 David Jondreau  Huzzah!

David Jondreau
  • Members
  • 1,946 posts
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12, 13
  • Membership:TechNet, FileMaker Business Alliance
  • Time Online: 9d 22h 18m 2s

Posted 07 June 2010 - 10:51 AM

Why not just have the table and layout names match up? Make the table names plural.
  • 0
"I do believe that there are some universal cognitive tasks that are deep and profound - indeed, so deep and profound that it is worthwhile to understand them in order to design our displays in accord with those tasks."
-Edward Tufte

Wing Forward Solutions, LLC
www.wingforward.net




FMForum Advertisers