Scripting Errors

There are many error messages that come up on the time card with a red X, here are a few messages that you may get and the steps to correct the error:

Unable to convert

These errors mean that you are comparing one item to another and it was unable to convert it to that type. This usually comes from trying to use an employee setup field that is blank, or using a variable before it has a value

 Value cannot be below 0

This refers to the hours which an hours amount cannot be below 0. This kind of error usually pops up when a script is reducing the number of hours on the time card but the hours punch does not have enough hours on it to reduce the amount scripted. Many times it happens on an in punch that does not currently have an out punch. This is because the line item does not have hours and the script is attempting to reduce the hours by a certain amount. This can be fixed by adding if(hours > 0) to the if statement.

Did you find this article helpful?