Originally posted by: SystemAdmin
Hi,
I need to write a rule for an output item which will return the required field from a list send as input corresponding to the specified condition. For e.g. suppose if we have two records: REC1 and REC2 having loops as DTL1(s) and DTL2(s). DTL1 group contains EMPID field and AMT Field and DTL2 group contains EMPID field and CREDITNUM Field. Now I need to write a rule such that it return CREDITNUM Field from DT2 group for the condition where EMPID from DTL1 matched with EMPID from DTL2.
I am using this way but it is not working:
LOOKUP(CREDITNUM Fields:DTL2:REC2,EMPID Fields:DTL2:REC2 = SEARCHUP(EMPID Fields:DTL1:REC1,EMPID Fields:DTL1:REC1,EMPID Fields,DTL2:REC2))
By this way if I am passing REC1 and REC2 as input, it only gives a first record, but what if every DTL group contains more than 1 record?
E.g. for input ():
REC1:(Header,EMPID,AMT) (Header,EMPID,CREDITNUM)
D,1234,23.45 D,1234,AC123
D,9876,45.67 D,9876,AC987
D,6745,67.78 D,6745,AC546
Thanks in advance,
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange