M
markell trotter
Guest
This process is using hr-history.emp_unum_supv to find the supervisor, but DCX program doesn't send either hr-history.supv-emp-id or hr-history.emp_unum_supv. A check is needed when looking for the supervisor info. If the emp_unum_supv is blank, then try supv-emp-id. If both are blank, then use the claimadr w/ addr-type = 'SUP'. /* supervisor info */ IF AVAILABLE hr-history THEN FIND bf-hr-master WHERE bf-hr-master.cont-num EQ claim.cont-num AND bf-hr-master.emp_unum EQ hr-history.emp_unum_supv AND bf-hr-master.deleted EQ FALSE NO-LOCK NO-ERROR. IF AVAILABLE hr-history AND AVAILABLE bf-hr-master AND bf-hr-master.first-name + bf-hr-master.last-name <> "" THEN ASSIGN tt-data-tble.sup-f-name = bf-hr-master.first-name tt-data-tble.sup-l-name = bf-hr-master.last-name tt-data-tble.sup-phone = fnFormatPhone(bf-hr-master.w-phone). ELSE DO: FIND FIRST claimadr OF claim WHERE claimadr.addr-type = "SUP" NO-LOCK NO-ERROR. IF AVAILABLE claimadr THEN ASSIGN tt-data-tble.sup-f-name = claimadr.first-name tt-data-tble.sup-l-name = claimadr.last-name tt-data-tble.sup-phone = fnFormatPhone(claimadr.phone1). END. I have tried everything I can think of to solve this but it seems that my logic is seriously flawed. This is the last solution I could think of and it does’t work either. IF AVAILABLE hr-history THEN FIND bf-hr-master WHERE bf-hr-master.cont-num EQ claim.cont-num AND bf-hr-master.emp_unum EQ hr-history.emp_unum_supv AND bf-hr-master.deleted EQ FALSE NO-LOCK NO-ERROR. ELSE IF NOT AVAILABLE hr-history THEN FIND bf-hr-master WHERE bf-hr-master.cont-num EQ claim.cont-num AND bf-hr-master.emp_id EQ hr-history.supv-emp-id AND bf-hr-master.deleted EQ FALSE NO-LOCK NO-ERROR. IF AVAILABLE hr-history AND AVAILABLE bf-hr-master AND bf-hr-master.first-name + bf-hr-master.last-name <> "" THEN ASSIGN tt-data-tble.sup-f-name = bf-hr-master.first-name tt-data-tble.sup-l-name = bf-hr-master.last-name tt-data-tble.sup-phone = fnFormatPhone(bf-hr-master.w-phone). ELSE DO: FIND FIRST claimadr OF claim WHERE claimadr.addr-type = "SUP" NO-LOCK NO-ERROR. IF AVAILABLE claimadr THEN ASSIGN tt-data-tble.sup-f-name = claimadr.first-name tt-data-tble.sup-l-name = claimadr.last-name tt-data-tble.sup-phone = fnFormatPhone(claimadr.phone1). END. I have tried so many possible solutions but I cannot seem to get the right logic for this.
Continue reading...
Continue reading...