1 Reply Latest reply on Jul 6, 2015 3:53 PM by philmodjunk

    Check Box Script



      Check Box Script


      How can I make a script so that when a certain item is selected in a Check Box Field it will trigger a certain phrase or sentence to be entered in another field. For example, if the "yes" is selected in a checkbox field of Yes or No, in another field it will then say "please see attached". if the "NO" is selected it will say "please contact BLANK". 

      Thank you!

        • 1. Re: Check Box Script

          No script is needed for that. a check box field of "yes" or "no" seems less than optimum as it allows the user to select both "yes" AND "no". A radio button format would make more sense as it limits the user to only one choice or the other. (Unless the user holds down the shift key and there are ways to set up an auto-enter calculation to keep that from working.)

          If the value in the field can only be the text "yes" or the text "no", then your other field can be either a calculation field or a text field with an auto-enter calculation. The expression used would be the same in either case:

          If ( RadioButtonFieldHere = "Yes" ; "please see attached" ; "please contact BLANK" )

          If you choose to use an auto-enter calculation, make sure to clear the "do not replace existing value..." check box.

          By using layout text with "hide object when expressions, (FileMaker 13 or newer), you can do this without needing any added field to show the "please..." text.