Skip to main content
Participant
June 17, 2024
Answered

Creating conditional formulas based on check boxes

  • June 17, 2024
  • 1 reply
  • 1258 views

Hi all! I am trying to add in conditional formulas into a column to calculate FTEs depending on which box is clicked. The lecture & LAB@LEC rate for FTE is 0.003704 and the lab rate is 0.002778. So if they check the lecture box, then the FTE column will calculate FTE by multiplying the amount of hours entered into the hours column by 0.003704, but if the check the lab box it will multiply the hours by 0.002778. I have attached the file for reference. Can anyone give me some guidance?

 

Thanks so much!

This topic has been closed for replies.
Correct answer PDF Automation Station

Enter the 0 before the decimal place for one of the export values:  0.002778 and don't enter if for the other that has the same value:  .002778.  The check boxes will be mutually exclusive and the math in the calculation should remain the same.  This article describes how to anticipate field names when writing calculation scripts so you only have to enter it once, and this article is about calculation order, which might come into play with your form.

1 reply

PDF Automation Station
Community Expert
Community Expert
June 17, 2024

You don't need a conditional statement.  Name the Lab checkboxes the sames as the corresponding Lec checkboxes, then use the rates as the export values for the corresponding checkboxes.  Use a "Product of" calculation in the FTE column that multiplies the corresponding checkbox by the hours.  This article explains how to do it for addition, but it works for multiplication as well.

Lucyyyy17Author
Participant
June 17, 2024

Oh my gosh, that's amazing! It worked! Now the only problem I ran into is that the LEC and LAB @ LEC rate have the same export value, so when I click on one the other is also selected. Can I fix it so only one can be checked at a time and they don't check simultaneously?

PDF Automation Station
Community Expert
Community Expert
June 17, 2024

Enter the 0 before the decimal place for one of the export values:  0.002778 and don't enter if for the other that has the same value:  .002778.  The check boxes will be mutually exclusive and the math in the calculation should remain the same.  This article describes how to anticipate field names when writing calculation scripts so you only have to enter it once, and this article is about calculation order, which might come into play with your form.