March 27, 200817 yr 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
March 27, 200817 yr ValueCount(Field) will tell you how many items are checked in a checkbox / radio button
March 27, 200817 yr 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 March 27, 200817 yr by Guest p.s.
March 28, 200817 yr I want to limit the total number of selections in a checkbox set. ... Checkbox Set (Max 3) This is another way to obtain what you asked. lanceomni.zip
March 28, 200817 yr 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
March 28, 200817 yr I don't think so... have you tried my file ? P.S. At least on Win the calc is correct and performs right.
March 28, 200817 yr 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.
March 28, 200817 yr 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
March 28, 200817 yr 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 ) :)
March 28, 200817 yr Ah. This is what threw me off. Another lesson that fields need to be enlarged for cross-platform compatibility.
March 28, 200817 yr 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.
March 28, 200817 yr I can see such needs... for example Alpha order, Numeric order or even custom list order in a text field or in a calculated one like Trim ( Substitute ( checkField ; ¶ ; " " ) ) Max_3_CheckMOD2.zip
March 28, 200817 yr 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.
Create an account or sign in to comment