Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
There are two solid solutions to the "same export value" issue.
1. Use radio buttons instead of checkboxes, with the "radiosInUnison" option.
2. Use a calculation script.
The calculation script will give you the best results, because it is the easiest to modify for future updates.
It should be written as a document level function, which is called from the FTE field's custom calculation. It can also be applied quickly and easily to all of the FTE fields by running a script from the console window.
Copy link to clipboard
Copied
Nevermind, I just added an extra decimal point and it worked. Thank you soooo much, you have no idea how helpful this will be for so many people!