I have an Alteryx formula to validate certain columns and produce desired comments. I am getting incorrect comments for one of the validation. below is the formula.
IF ISNULL([Termination Date]) THEN "Termination Date is Blank"
ELSEIF [Termination Date] > [Ed Date] THEN
"No action needed, Termination date is future dated"
ELSEIF [Termination Date] < [St Date] AND [Result Line Amount] != 0 AND NOT ISNULL([Retro Period]) THEN
"No action required, Retro Pay"
ELSEIF [Termination Date] < [ST DATE] AND [RESULT LINE AMOUNT] = 0 THEN
"No action needed, Employee is not getting any pay in current oncycle paycheck"
ELSEIF [TERMINATION DATE] > [ST DATE] AND [TERMINATION DATE] <= [ED DATE] AND [RESULT LINE AMOUNT] = 0 THEN
"Need to check for Missing pay"
ELSEIF [TERMINATION DATE] > [ST DATE] AND [TERMINATION DATE] <= [ED DATE] AND [RESULT LINE AMOUNT] > 0 THEN
"Need to check, Employee is terminated during the pay period " +[Termination Date]
ELSEIF [TERMINATION DATE] < [ST DATE] AND [RESULT LINE AMOUNT] > 0 AND
NOT CONTAINS([Earning], "Salary Base Pay - BASE") OR NOT CONTAINS([EARNING], "Hourly - Regular - REGH") THEN
"Prior date termination receiving earning other than reg. Validate for Bonus or OTP"
ELSEIF [TERMINATION DATE] < [ST DATE] AND [RESULT LINE AMOUNT] > 0 AND
(CONTAINS([EARNING], "Salary Base Pay - BASE") OR CONTAINS([EARNING], "Hourly - Regular - REGH")) THEN
"Prior date termination receiving Reg Sal. Possible OP"
ELSE
"Need to check"
ENDIF
for one of the scenario i am getting comment "Prior date termination receiving earning other than reg. Validate for Bonus or OTP" can someone review the formula and highlight what's wrong.
| Employee Status | Termination Date | Earning | Retro Period | Result Line Hours | Result Line Amount | St Date | Ed Date |
| Terminated | 7/1/2023 | Salary Base Pay - BASE | | 0 | 0 | 7/1/2023 | 7/15/2023 |