Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
What am i Doing wrong here? I have created 2 mappings. which i would like to use in my load.
I have an Industrycode on all my customers. This industry code can then "reveal" a sector code. There are 2 rules to use here.
If it has a value, then "lookup" the value in MAP_CAT_CODE. This fails, and tells me the field [Industry code] dosn't exist?
IF blank(here we use dot). then i need to look in the MAP_CHANNEL. The map channel needs to look up the channel value of the customer. so get the correct value. Is this correct made? I haven't gotten this fare since it's fails. so I thought I could just as well to a double question while at it.
Thanks
MAP_CAT_CODE:
LOAD [Industry Code],
[CAT CODE 26]
FROM
(ooxml, embedded labels, table is [Industrial Codes]);
MAP_CHANNEL:
Mapping LOAD
A,
B
FROM
(ooxml, no labels, table is Sheet1);
LOAD
Customer as SellToCustomer,
Channel as A,
Industry,
If(Industry <> '.' , ApplyMap('MAP_CAT_CODE', [Industry Code], 'IA BLANK'), ApplyMap('MAP_CHANNEL', A, 'IA BLANK' )) as JDE_SECTOR,
SectorDesc as JDE_SECTOR_DESCRIPTION
FROM
(ooxml, embedded labels, table is Sheet1);
I think you forgot to add the keyword Mapping in your first table:
MAP_CAT_CODE:
Mapping
LOAD [Industry Code],
[CAT CODE 26]
FROM
(ooxml, embedded labels, table is [Industrial Codes]);
Also you need to use the actual field name instead of the new field name here:
LOAD Customer as SellToCustomer,
Channel as A,
Industry,
If(Industry <> '.' , ApplyMap('MAP_CAT_CODE', [Industry Code], 'IA BLANK'), ApplyMap('MAP_CHANNEL', Channel, 'IA BLANK' )) as JDE_SECTOR,
SectorDesc as JDE_SECTOR_DESCRIPTION
FROM
(ooxml, embedded labels, table is Sheet1);
And probably [Industry Code] needs to be [Industry] ??
Thank you both..
The missing mapping, where because I "cleaned" the code with all the company names etc. and i removed to much.
It's was as you both suggested the Reference in the Applymap I had misunderstood. I though i should you the name from the mapping column. And when i used the field names from the actual load It worked perfect.
PS. What does it take to be able to post in real time? Really annoying you sometimes have to wait several hours before it's approved.