06 December 2007

How to check if a Date Element is Null

Testing if a Date Element is null within a Formula Element is simple, right? It is not as obvious as you may think.

If you attempt to do this by comparing the date to a numeric value of zero you receive the following error when validating the formula “Mixed datatypes used as operands. (17000,1768) The operand(s) on either side of an operator must be of the same datatype.”.

Likewise, the same error occurs if you compare a Date element to an empty Character.

The simple (but no so obvious) solution is to compare the Date Element to another date element that you know is currently Null.

02 December 2007

Passing Parameters to Payroll Messages

There is a common gotcha when attempting to pass parameters to a Payroll Message using the "MSG BINDn PTR" elements.

If you get error number 508 from Message Set number 17005 saying "... Element pointer # has not been set.", there is a good chance you have come across this issue.

When passing your parameter to the "MSG BINDn PTR" System Element (e.g. "MSG BIND1 PTR") it is important that you set the element attributes for both the parameter being passed and the "MSG BINDn PTR" System Element to the "Use Element Number" setting.

To set this value select the "Attributes" icon next to the element.

Change the "Value/Pointer Selection" to "Use Element Number".

This links/points the "MSG BINDn PTR" to the parameter.