I’m currently working on a performance review in which one of the review categories assigns a score based on the hours absent. The maximum score is 5. The table is
Hours Absent Score
0-8 5
9-32 4
33-40 3
41-57 2
58-66 1
67 or higher 0
I’d like for the Score field to automatically calculate based on what is the user types in the "Hours Absent" field. Since that value is a range, what is the best way to create this, validation or calculation? And how would I write that script?
Thanks in advance
This code assumes that the "Hours Absent" field has a numeric format category. Replace "your_score_field" with the actual name of your score field. You may want to do additional validation of the input, but you should get the idea. Notice that if the user enters a negative number, the code above just sets the score field to blank.
I use validation scripts when possible as it is more efficient and avoids a number of other issues that can crop up when using calculation scripts.
A custom calculation script would be similar, but have important differences. If you want to use a calculation script for the score field, post again.
George