Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have requirement on multiple lookup/ applymap
Below is data:
Table_1:
NAME | ID | BRACH_CD |
---|---|---|
A1 | 12367 | 701 |
A2 | 6431 | 652 |
B5 | 7891 | 245 |
Staff:
NAME | ID | BRANH_CD |
---|---|---|
A1 | 12367 | 707 |
A2 | 6431 | 631 |
A3 | 7321 | 701 |
B1 | 3854 | 622 |
B5 | 7891 | 245 |
Refer:
NAME | ID | BRANCH_NAME | BRANCH_CD |
---|---|---|---|
A1 | 12367 | AMPG | 707 |
A3 | 679 | KPG | 708 |
A5 | 7028 | KL | 601 |
B5 | 7891 | BKJL | 245 |
Now,
First, if NAME and ID in Table_1 is matched with NAME and ID in Staff table then it should bring the BRANCH_CD from staff table into Table_1. This will add new column into Table_1. but again , if the NEW_BRANCH_CD(this is new column where we got with applymap) in Table_1 matches with BRANCH_CD in Refer table, then it should bring BRANCH_CD(old_code) from Table_1.
I don't understand what you're trying to do (I see no NEW_BRANCH_CD field anywhere, but you can nest applymap:
ApplyMap('map1', FieldX, ApplyMap('map2', FieldX, ...etc ))
NEW_BRANCH_CD is newly added column in Table_1 which is on basis of applymap from Staff table.
but my second applymap is reverse, which means, if NEW_BRANCH_CD is matched with BRANCH_CD in Refer table then it should bring BRANCH_CD from Table_1
Then you need to create a new mapping table after you've modified Table 1. Then create a new table using the Refer table as source and the new mapping table created from the modified Table 1.
Hi, Thanks for the reply, with first apply map I have Got like below.
Table_1_TEMP:
NAME | ID | BRACH_CD | NEW_BRANCH_CD |
---|---|---|---|
A1 | 12367 | 701 | 707 |
A2 | 6431 | 652 | 631 |
B5 | 7891 | 245 | 245 |
Refer:
NAME | ID | BRANCH_NAME | BRANCH_CD |
---|---|---|---|
A1 | 12367 | AMPG | 707 |
A3 | 679 | KPG | 708 |
A5 | 7028 | KL | 601 |
B5 | 7891 | BKJL | 245 |
using above Refer table I have to do apply map, if Table_1_TEMP.NEW_BRANCH_CD= Refer. BRANCH_CD
and Table_1_TEMP.ID=Refer.ID then I have to replace with Table_1_TEMP.BRANCH_CD
expected:
Table_1_TEMP:
NAME | ID | BRACH_CD | NEW_BRANCH_CD |
---|---|---|---|
A1 | 12367 | 701 | 701 |
A2 | 6431 | 652 | 631 |
B5 | 7891 | 245 | 245 |
see attached qvw