2 Replies Latest reply on Apr 23, 2015 5:36 PM by RobMacy

    Event Conditional Checkbox

    RobMacy

      Title

      Event Conditional Checkbox

      Post

      What Im trying to do is if a patients eye acuity is anything below 40 (the 20 is automatic) a check box for only approved while wearing corrective lenses is checked.

      Can I just set that box to 1(true) and it will check ,or not.

      if( acuity>40)

      { onlyWHileWearing=true

      Is this basically it?

        • 1. Re: Event Conditional Checkbox
          philmodjunk

          This could be either set up as a script or a calculation. But what value you set that check box field and how you do it depends on whether this is a field with a single check box and on what value list you set up and select as the format for this field when you place the field on a layout.

          If you have only one check box for this field, you can define a value list with a single value, the number 1. (Note: you can resize the field so that only the check box and not the number 1 is visible.)

          Then:

          Set Field [YourTable::yourcheckboxField ; 1 ]

          will cause that check box to show as selected.

          Set FIeld [YourTable::yourcheckboxField ; True ]

          will produce an identical result.

          But you might define this field as a calculation field or a number field with an auto-enter calculation such as:

          Acuity > 40

          Select "number" as your result type if using a calculation field.

          You can format this field with the same check box format and single value value list as previously described, but now it will change to show the check box as selected or not selected when you modify the value of the acuity field without any script needed.

          If you have a field with multiple check boxes, a more complex method for selecting/clearing check boxes as values in other fields change would be needed.

          • 2. Re: Event Conditional Checkbox
            RobMacy

            Thanks again PhilModJunk!!!!!