Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a checkbox field called 'Age' that contains the following possibilities of target age group for which my games are intended for;

2 - 4

5 - 6

7 - 9

10 -15

Some games can be played by both toddlers & older children, so I have ticked two, three or all of the checkboxes. When clients search the games database, They view the game description and under age they see a field called 'Age inclusive' which is a formula grabbing the left word &"-"& the right word of the 'Age' field, which works nicely when I have ticked one box or ticked several in order from lowest to highest.

HOWEVER, if I tick '7 - 9' and then '2 - 4', the calculation result is '7 - 4', because filemaker stores multiple entries selected in checkboxes in order they were selected.

How in the world can I make sure than no matter in what order the checkboxes are selected, they are sorted lowest to highest providing the 'Age inclusive' formula the correct result every time. Or maybe there is a more elegant solution to this seemingly simple problem,

Thank you so much for your time and help

Posted

Why not simply have a minimum age field (and a maximum age field, if you feel that's necessary). No checkboxes, just a set of number fields.

Posted

Try:

Let(

checked = FilterValues ( ValueListItems ( Get ( FileName ) ; "TheNameOfYourValueListInQuotes" ) ; YourCheckboxField ) ;

LeftWord ( checked ; 1 ) & " - " & RightWord ( checked ; 1 )

)

Posted

Raybaudi - You are a genius my friend! Worked like a charm.

Out of curiosity, what is this formula actually doing? I don't find the function 'checked'?

Thanks a milion!!!

Posted

"checked" is not a function, but a parameter of the Let ( ) function.

Think at it as to another calculated field ( that I named "checked", but I could even name it simply "c" ).

The ordering of values ​​is made ​​possible by the FilterValues ​​( ) function.

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