on 06-12-2015 6:47 PM
Hi All,
I have a source structure like this
Source: Target:
<Root> records 0:99999
segmentA 0:1 fieldA1
fieldA1 fieldB1
segmentB 0:99999 fieldB2
fieldB1 0:1 fieldC1
fieldB2 0:1 fieldC2
segmentB1 0:10
fieldB11 (value = A,B,C,D,E)
fieldB12
the number of records in the flat file is based on the number of segmentB. The feildC1 = fieldB12 when fieldB11 = 'A'. fieldC2 = fieldB12 when field B11 = 'B'. when there is no fieldB11 has value A, fieldC1 = blank; when fieldB11 = 'A', but there is no fieldB12, fieldC1 = blank. The same logic applies to fieldC2.
Can anyone has an idea on how the mapping logic for fieldC1 and FieldC2 would be?
Thanks a lot!
Meiying
Hi,
For field C1, apply the mapping logic : "(IF B11 equalS constant[A] OR B11 equalS constant[]) then map field B12 to field C1 via UDF "map with default[]".
For field C2, appply the mapping logic : "(IF B11 equalS constant[B] OR B11 equalS constant[]) then map field B12 to field C2 via UDF "map with default[]".
Regards,
Souvik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Souvik,
Thanks for the reply. Unfortunately, the logic doesn't work. The main problem is segmentB1 is multiple and field B11 may not have value A at all in the source. When this happens, after if-then, in "Display Queue", only show "suppress". no value pass over. since field C1 is mandatory, system gave "Missing value" error and it won't map to "mapwithdefault[]". I will give you an example:
Thank you!
Meiying
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.