1 Reply Latest reply on Apr 20, 2011 3:18 PM by philmodjunk

    Checkbox Off

    one9lbhammer

      Title

      Checkbox Off

      Post

      I have a checkbox that when checked keeps my invoice as a quote, that is to say it is referenced in a couple of different scripts to a) keep the quote off of the layout that we use for an order form, and b) keeps the job from being sent to iCal.

      As it stands, when the date is entered into the DueDate field and the checkbox is unchecked, the job goes to iCal, and when it's checked it doesn't.  The problem we are running into is people forgetting to re-enter the date after they uncheck the checkbox and quotes that become actual invoices are being left off of the calendar. Is there a way to make turning off the checkbox automatically re-enter the due date so that it will then run the script that sends the job to the calendar? 

        • 1. Re: Checkbox Off
          philmodjunk

          Use button Setup... to make your check box field a button that runs a script like this:

          If [ IsEmpty ( yourtable::Yourcheckboxfield ) /* box is checked */]
             Set field [YourTable::yourCheckBoxField ; "" ] //clear the check box
             Set Field [YourTable::YourDateField ; //put an expression here to enter the updated due date here ]
          Else
             Set Field [Yourtable::yourCheckBoxField ; //put constant here that is the same value you'd enter if you checked the check box with your mouse]
          End If