1 Reply Latest reply on Dec 15, 2008 2:12 AM by Orlando

    Tick boxes

    glosandy

      Title

      Tick boxes

      Post

      Good morning, 

       

      I want to be able to "tick" next to some text or an actual field, to indicate that it has been selected but also to display this as a "tick" (as opposed to the standard cross or radio button).

       

      Any ideas?

       

      Thanks

       

      Andrew 

        • 1. Re: Tick boxes
          Orlando
            

          Hi Andrew

           

          This can be done, but is not supported natively in FileMaker so you need to recreate it using images of you "Tick" on and off in container fields, a calculation to display the correct image and a sriopt that will set the value of your field.

           

          Along with the field that holds the value, I will call this OptionField 

           

          First off crete two container fields, TickOn and TickOff and set the Type: to Container. Click Options and check the box to set the field as a Global.

           

          Crete a calculation that will be displayed on teh layou

           

            TickDisplay = ( Calculated Container )

           

               If ( OptionField = 1 ; TickOn ; TickOff )

           

          Now come out of Define Database and place the four fields on your layout. Insert the appropriate images into the container fields and test the calculation works by placing a 1 in OptionField.

           

          Now you need to create a Script that will simply be:

           

            TickButton 

           

            #

            If [ TABLE:: OptionField = 1 ]

              Set Field [ Tabel:: OptionField ; "" ]

            Else 

              Set Field [ Tabel:: OptionField ; 1 ] 

            End If

            Commit Record/Request []

            #

           

          In layout mode attache the script TickButton to the calculated field TickDisplay by selecting the field and the go: Format > Button Setup... and selecting the script TickButton.

           

          Now go into Browse mode and click on the TickDisplay field and the image should change. 

           

          I hope this makes sense and let me know how you get.