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 6144 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I want to determine the # of items selected in a checkbox set and adjust the background color of the label when it falls within a certain range

Lable(max 2)

[]option1

[]option2

[]option3

[]option4

for instance I want the label's background to be red when nothing is selected

And when at least 1 is selected but not greater than 2 selected - I want the background green

Posted

ValueCount(Field) will tell you how many items are checked in a checkbox / radio button

Posted (edited)

I deleted your Duplicate Post.

I want to limit the total number of selections in a checkbox set.

I see how you can limit by number of characters, uniqueness and value. Is it possible to limit the total number of selections.

Checkbox Set (Max 3)

[]

[]

[]

[]

[]

[]

so to only allow up to three selections.

Thank you.

I made a quick sample of your original post (see attachment).

If you only have version 8.5 as you stated, then you will not see any thing in the Label Field on the Right.

Lee

[color:red]p.s.

You will have to adjust the numbers in the calculation to match your new request.

lanceomni.fp7.zip

Edited by Guest
p.s.
Posted

Erhm! Shouldn't it be:

Case(

ValueCount ( Max 3 Check ) > 4 ; LeftValues ( Max 3 Check ; 3 ) ;

Max 3 Check

)

But still are there issues, which needs a little tightning up, if you intially have selected box {1;3;5} and tries to set 2, will both {2;5} be cleared.

--sd

Posted

It doesn't work correctly, because the field also contains the value "Option 6", which isn't part of the value list, but is counted. So I can only check up to 2 (additional) values.

In any case, the formula can be simply:

LeftValues ( CheckBoxField ; 3 )

or:

RightValues ( CheckBoxField ; 3 )

depending on the desired behavior.

Posted

Ok I think I've got it fixed:

Case(

ValueCount ( List(Max 3 Check )) > 4 ; LeftValues ( List(Max 3 Check) ; 4 ) ;

List(Max 3 Check)

)

--sd

Posted

This is ( and I can see it ) the "Options" value list:

Option 1

Option 2

Option 3

Option 4

Option 5

Option 6

BTW: your calc is better ( to see ) :)

Posted

What difference does it make, when you are using LeftValues ()?

It would be different with RightValues(), but I don't think users would like it very much. I would expect a FIFO order, possibly LIFO, but certainly not the value list order.

Posted

Ah (for the second time). I thought you wanted to take the first/last 3 choices of user in alphabetical order.

I see why you would sometimes want to sort a checkbox, but it doesn't seem to be relevant to the thread's topic.

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