I want to create a fast formula controls that if a worker has an absence type A, this worker shouldn't get any absence. To do so I created this fast formula:
DEFAULT FOR A IS '0'
absence_type = 300000002284767
L_PERSON_ID = GET_CONTEXT(PERSON_ID,1)
A = GET_VALUE_SET('XX_ABSENCE_TYPES_OF_PERSON','|=PERSON_ID =300000002268381|ABSENCE_TYPE_ID=300000002284767')
IF (A = to_char(absence_type))
THEN VALID = 'N'
ELSE VALID = 'Y'
ERROR_MESSAGE = 'ERROR'
RETURN VALID, ERROR_MESSAGE
XX_ABSENCE_TYPES_OF is a value set, you can find the information of that in the attachment. Even if I give the parameters hard coded and the compilation status is OK, this fast formula is not working as expected. Please let me know how to solve this problem. If I can solve this problem with another formula or something like that, please share that, too.
Thanks for your effort.