Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have a field called Sizes, which is a check box.  The options are Studio, One / One, Two / One, Two / Two, Three / Two.  I'm trying to make a calculation field, export_sizes, which would be in this format:

One Bed, Two Bed, Three Bed

 

I don't care about studios.  But if a record has sizes one/one and three/two, it should be calculated at "One Bed, Three Bed".

 

If a record has sizes two/one and two/two, is should be calculated at "Two Bed".

 

This should be simple, but I can't seem to make sense of it...

 

Any help would be greatly appreciated. 

Posted
 

This should be simple, but I can't seem to make sense of it...

 
One could say that "you made your list, now lie in it", but that would be a bit harsh …  :laugh:
 
Try
Let ( [

  l = ¶ & List ( "three/two" ; "Studio" ; "one/one" ) ; // sample data: List() represents your field; keep the pilcrow

  one = Case ( PatternCount ( l ; "¶one" ) ; "One Bed" ) ;
  two =  Case ( PatternCount ( l ; "¶two" ) ; "Two Bed" ) ; 
  three = Case ( PatternCount ( l ; "¶three" ) ; "Three Bed" )
  ] ; 
  Substitute ( List ( one ; two ; three ) ; ¶ ; ", " )
)

which for the sample value list returns "One Bed, Three Bed"

Posted

I know, I have learned my lesson on checkboxes.  Thanks for the help, worked like a charm!

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