1 Reply Latest reply on Sep 11, 2014 10:06 AM by philmodjunk

    confusion with checkboxes



      confusion with checkboxes


      The answer to these two related questions may be obvious, but I've spent considerable time searching through forums etc. without success.

      Question 1.

      I'm creating a database that requires a number of Checkbox fields that include the ability to check one or more values as well as input a value not listed among the Checkboxes, i.e. "Other".

      Problem is, I cannot seem to create a way in the layout for someone to see what that "Other" value is once it is input (without clicking on Other to see what the value is).

      For example:

      If the Field is "Main Ingredients", and the checkboxes are: Fish, Beef, Chicken, Pork, Veg, Other…If the user checks Other, then types "Fruit" in Other….how can the layout be created in such a way that the word Fruit remains visible? (And, if this needs to be done via creation of another field, how is this  link done?

      (Ideally, this also needs to work if the user checks, say, Pork, Veg, Other, then types in Fruit for Other…without seeing the ingredients Pork, Veg repeated.)

      (I've posted a screenshot below of another field with the same problem, in this case, "Cuisine".)

      Question 2.

      I want to use values in the Checkbox list in a calculation. As an example, using the same Checkbox list as above, how in a calculation do I specify the value of a single checkbox? And how would this work if the value in the calculation was the variable content of "Other" as opposed to a specfic value already listed as a specific checkbox item.

      Thank you in advance.



        • 1. Re: confusion with checkboxes

          how in a calculation do I specify the value of a single checkbox?

          If you want to determine if "French" was clicked in the above example no matter what other boxes might  be clicked, use:

          Not IsEmpty ( FilterValues ( YourCheckBoxFieldHere ; "French" ) )

          This result will be True if the French value has been selected.

          And there are ways to use the List function if you want to use a script to select a value in this field without clearing the other check boxes as well as ways to clear just the one selected value.

          "Other..." will be a problem. You might consider putting "other" values in a separate field or set up this value list with a "use values from field" value list and add a new record to that table with the new value--which then adds the value as a check box in your check box group. (This takes a script performed when the user clicks a check box in this group.)

          You may find it helpful to look at: Adventures in FileMaking #2 as some of the topics in it cover both how check boxes work, how to use them in calculations and also shows some alternative setups that look and function like check boxes, but aren't. (And have added features not possible in a standard check box group.)