Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Map product name

I want to use ApplyMap with a concatenated field but this is the script editor error message I get.

Started loading data

MapIt << Sheet2 Lines fetched: 44

The following error occurred:

Field 'Key Field' not found

The error occurred here:

?

Data has not been loaded. Please correct the error and try loading again.

This is my script.

MapIt:

Mapping Load

[Order Number]&[Brand]&[Motor Type] as "Key Field",

Product

FROM [lib://Motors/Motors.xlsx]

(ooxml, embedded labels, table is Sheet2);

Details:

LOAD

    "Order Number",

    Brand,

    "Motor Type",

    [Order Number]&[Brand]&[Motor Type] as "Key Field",

    ApplyMap('MapIt', "Key Field", null()) as ProductName

FROM [lib://Motors/Motors.xlsx]

(ooxml, embedded labels, table is Sheet1);

This is from Sheet1

Order NumberBrandMotor Type
100388VolkswagenCompacts
100388BMWSAVs
100388BMWSedans
100388BMWCoupes
100388BMWConvertibles
100388BMWSAVs
100388VolkswagenConvertibles
100388VolkswagenSUVS
100388VolkswagenSUVS
100879BMWSedans
100879BMWCoupes
100879BMWConvertibles
100879BMWSedans
100879VolkswagenCompacts
100879VolkswagenSedans
100879BMWCoupes
100879BMWConvertibles
100879BMWSAVs
100879BMWSedans
100890BMWSedans
100890BMWConvertibles
100890BMWSedans
100890VolkswagenCompacts
100890VolkswagenWagons
100923VolkswagenSedans
100923BMWCoupes
100923BMWSAVs
100923VolkswagenWagons
100923BMWCoupes
100930BMWCoupes
100930BMWCoupes
100930BMWCoupes
100930BMWCoupes
100930BMWSedans
100930VolkswagenCompacts
100930BMWSedans
100930BMWCoupes
100930BMWSAVs
100930BMWSAVs
100936BMWSAVs
100936BMWSedans
100936BMWSedans
100936VolkswagenCompacts
100936BMWSAVs

This is from Sheet2

    

Order NumberBrandMotor TypeProduct
100388VolkswagenCompactsBeetle
100388BMWSAVsX5 Sports Activity Vehicle
100388BMWSedans7 Series Sedan
100388BMWCoupesM2 Competition Coupe
100388BMWConvertiblesM4 Convertible
100388BMWSAVsX2 Sports Activity Coupe
100388VolkswagenConvertiblesBeetle Convertible
100388VolkswagenSUVSTiguan
100388VolkswagenSUVSAtlas
100879BMWSedans3 Series Gran Turismo
100879BMWCoupes2 Series Coupe
100879BMWConvertibles4 Series Convertible
100879BMWSedans6 Series Gran Turismo
100879VolkswagenCompactsGolfGTI
100879VolkswagenSedansPassat
100879BMWCoupes6 Series Gran Coupe
100879BMWConvertibles2 Series Convertible
100879BMWSAVsX4 Sports Activity Coupe
100879BMWSedans3 Series Sedan
100890BMWSedans3 Series Sports Wagon
100890BMWConvertiblesBMW i8 Roadster
100890BMWSedansM5 Sedan
100890VolkswagenCompactsGolf R
100890VolkswagenWagonsGolf SportWagen
100923VolkswagenSedansJetta
100923BMWCoupesALPINA B6
100923BMWSAVsX1 Sports Activity Vehicle
100923VolkswagenWagonsGolf Alltrack
100923BMWCoupesM6 Gran Coupe
100930BMWCoupesBMW i8
100930BMWCoupes4 Series Gran Coupe
100930BMWCoupesM4 Coupe
100930BMWCoupes4 Series Coupe
100930BMWSedansBMW i3
100930VolkswagenCompactse-Golf
100930BMWSedans5 Series Sedan
100930BMWCoupes8 Series Coupe
100930BMWSAVsX5 M Sports Activity Vehicle
100930BMWSAVsX6 Sports Activity Coupe
100936BMWSAVsX6 M Sports Activity Coupe
100936BMWSedansALPINA B7
100936BMWSedansM3 Sedan
100936VolkswagenCompactsGolf
100936BMWSAVsX3 Sports Activity Vehicle
1 Solution

Accepted Solutions
undergrinder
Specialist II
Specialist II

Hi John,

At that step that field is not exist, change it to the definition.

Try this:

Details:

LOAD

    "Order Number",

    Brand,

    "Motor Type",

    [Order Number]&[Brand]&[Motor Type] as "Key Field",

    ApplyMap('MapIt', [Order Number]&[Brand]&[Motor Type], null()) as ProductName

FROM [lib://Motors/Motors.xlsx]

(ooxml, embedded labels, table is Sheet1);

G.

View solution in original post

1 Reply
undergrinder
Specialist II
Specialist II

Hi John,

At that step that field is not exist, change it to the definition.

Try this:

Details:

LOAD

    "Order Number",

    Brand,

    "Motor Type",

    [Order Number]&[Brand]&[Motor Type] as "Key Field",

    ApplyMap('MapIt', [Order Number]&[Brand]&[Motor Type], null()) as ProductName

FROM [lib://Motors/Motors.xlsx]

(ooxml, embedded labels, table is Sheet1);

G.