I'm trying to add a comment line to a personnel action with the following ags node:
_PDL=TEST21&_TKN=PA56.1&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=Change&PAC-COMPANY=3200&PAC-EMPLOYEE=405&PAC-DATE=20080312&LINE-FC1=A&PAC-CMT-TEXT1=&PAC-ACTION-CODE-IND=STATUSCHG&PAC-ACTION-CODE=STATUSCHG&PT-ACTION-TYPE=E&PT-PAC-LN-NBR=1&_DELIM=%09&_OUT=TEXT&_EOT=TRUE
This works fine if there is an existing comment line attached to the personnel action. If there is no existing comment, I get the message "No comments exist for this action. I've tried changing FC to Add as well. What am I missing? Any suggestions are appreciated.
Thanks, Brian
This might be a little late but I might have a solution. Query the PA56 file (Table) to see if there is a record ... If there is a record then you can use a change function but if there are no records then you will want to use the add function. My guess is that there is no PA56 record for the employee so you need to ADD the first one.
After the query use a branch that looks for records using this variable name: nodename_RECORD_COUNT ...
If the record count is greater than 0 then write the AGS to process a CHANGE, if it is = to 0 then use an AGS to ADD.