Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

markgraham123
Contributor II

basics about mapping load

Hi,

I'm a begineer in QlikView.

I have gone thorugh videos of Mapping load tutorials but everything confused me.

I have a QVW file where i have ID and Name.

I wanna map the Name to a place from Excel sheet.

ID Name

1  John

2  Eli

3  Mark

4  Robert

Excel sheet to map:

 

NamePlace
JohnUSA
EliLondon
MarkParis
RobertIndia

So, in QlikView frint end, when i select ID 1, i can see place USA.

Can someone help..

Tags (1)
1 Solution

Accepted Solutions
hrlinder
Honored Contributor

Re: basics about mapping load

you talk about mapping load, but what you want you donot Need it

in Frontend you define listbox with Name and you define a table with ID and Place

the datamodel automatically connects the two tables by the same fieldname (=Name).

so you select ID = 1, the table reduces to 1 row with ID=1 and Place=USA

if you want to know how mapping works:

you Need following steps in script

define mapping table

MapName2Place:

mapping load

Name,

Place

from yoursource

TableIDName:

load

ID,

applymap('MapName2Place', Name,'NN') as whateryouwant

from pothresource

but even that you donot Need

a simple join what doit also

4 Replies
hrlinder
Honored Contributor

Re: basics about mapping load

you talk about mapping load, but what you want you donot Need it

in Frontend you define listbox with Name and you define a table with ID and Place

the datamodel automatically connects the two tables by the same fieldname (=Name).

so you select ID = 1, the table reduces to 1 row with ID=1 and Place=USA

if you want to know how mapping works:

you Need following steps in script

define mapping table

MapName2Place:

mapping load

Name,

Place

from yoursource

TableIDName:

load

ID,

applymap('MapName2Place', Name,'NN') as whateryouwant

from pothresource

but even that you donot Need

a simple join what doit also

markgraham123
Contributor II

Re: basics about mapping load

Hi,

There were hundereds lines and the ID which i referred to might be repeating.

I wanna do it by mapping it in script load.

syntax mentioned by you is i assume:

I was not understanding 'NN' ???

MapName2Place:   - (Excel sheet)

mapping load

Name,

Place

from yoursource

TableIDName: - (qvd in app)

load

ID,

applymap('MapName2Place', Name,'NN') as whateryouwant

from pothresource

hrlinder
Honored Contributor

Re: basics about mapping load

'NN' means when an ID receives the mapping table which was not loaded you will get 'NN'

if you are sure, that you have all distinct values , then you donot Need 'NN' (skip it)

markgraham123
Contributor II

Re: basics about mapping load

Thanq Rudolf

Community Browser