dave, it's not natively in kix but there is userDefinedFunction for this in udf forum:
PriMapState()

is that ok?
_________________________
!

download KiXnet