2 Replies Latest reply on Nov 10, 2014 1:13 AM by illumine

    Script-Controlled Checkbox Behavior



      Script-Controlled Checkbox Behavior


      I'm developing a solution to be used by Special Education teachers to manage certain classroom admin. activities, etc. Presently, I am putting together a tab control where one of the tabs hosts various fields regarding the enrollment category of each student.

      One of the fields is a checkbox format: [ ] IEP    [ ] Temporary    [ ] Tuition    [ ] File-Holder

      (I've attached a screenshot but I can't view it for some reason; don't know if you can see it either.) The checkboxes need to have specific rules of behavior to allow for certain checked combinations and disallow for others.



      1. IEP (only); IEP and File-Holder (concurrently)
      3. Temporary (only)
      5. Tuition (only)
      7. File-Holder (only)



      1. IEP and Temporary (concurrently) or IEP and Tuition (concurrently)
      3. Temporary and Tuition (concurrently)
      5. Temporary and File-Holder (concurrently)
      7. Tuition and File-Holder (concurrently)


      From online research, I am able to check for values in the checkbox list using something along this line (with modifications):

      If ( IsEmpty ( FilterValues ( checkboxfield ; checkfor ) ); 0; 1 )

      In order to check for all the identified combinations and disallow for others it seems as though I must have a long list of "If" / "Else If" logical script steps to drill down through.

      My question is, am I on the right track with this thinking, or is there a better, more straightforward way?

      Many thanks, as always.

      FMPA v.13, OSX v.10.7.5, Experience: novice to low-intermediate


        • 1. Re: Script-Controlled Checkbox Behavior


          in the calculated auto-enter option of that field, put this calculation:

          Self = "IEP¶File-Holder" or Self ="File-Holder¶IEP" ; Self ;
          GetValue ( Self ; ValueCount ( Self ) )

          Remember to uncheck the box: "Do not replace existing value of field..."

          • 2. Re: Script-Controlled Checkbox Behavior
            Holy smokes, that was incredibly easy!  I knew a more economical way had to exist.  It works perfectly!  I'm still in the steep part of the FM learning curve so most innovative approaches like this don't just present themselves.  You just helped me bounce forward a little in that search for FM knowledge and experience. Thanks so much, raybaudi.