We have a process with the rule listed below. Everything works except that we end up with each Pending created with "Pending.LastFour" containing the last four characters of the 1st instance of NSCPers.SocialSecurityNumber found. All the other "Pending" attributes have the correct values. We really need to capture those "LastFour" from the SSNs. It is a US DOD requirement that our ID cards only show the last four numbers of the SSN.
FIND NSCPers WHERE NSCPers.UnitCode=LoggedInRegularUser.LoginName AND
(NSCPers.MemberStatus='P' OR NSCPers.MemberStatus='I' OR NSCPers.MemberStatus='R')
CREATE Pending FOR EACH NSCPers WITH
Pending.MemberType=NSCPers.MemberType,
Pending.Type=NSCPers.MemberStatus,
Pending.SocialSecurityNumber=NSCPers.SocialSecurityNumber,
Pending.LastFour=CHARS_FROM_RIGHT(NSCPers.SocialSecurityNumber,4),
Pending.UnitCode=NSCPers.UnitCode,
Pending.Amount=NSCPers.AmountPaid,
Pending.Date=CURRENT_DATE,
Pending.LastName=NSCPers.LastName,
Pending.FirstName=NSCPers.FirstName,
Pending.BirthDate=NSCPers.BirthDate,
Pending.ExpireDate=NSCPers.ExpireDate,
Pending.Rank=NSCPers.Rank
Vins Nash