Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Mapping new values

Hello,

I have a customer table wich contains custome number, SalesmanG and SalesmanB. For most

of our customers are the two salesman fields filled with values and SalesmanG do I like to copy into the invoice tqble

by a mapping. If there are no values for the salesman I like to add a default value. I have tried this code but it doesnt work.

I know that customer SE005037 do not have any salesman and the field inv_salesman should have value SE999900.

See the code and result in attached files.

kindly

Håkan

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Re: Mapping new values

try to replace your Map_salesman1 with (change in bold)

Map_salesman1:

MAPPING LOAD

     Custnumber1,

     SalesmanG as Salesman1

Resident Customer_Read

where len(trim(SalesmanG))>0

;

why?

SE005037 is in Customer_Read table with blank SalesmanG

you load SE005037, blank in Map_salesman1

you get blank (not missing --> not SE999900) when you applymap in Invoice


with my change (bold) you esclude the blanks in Map_salesman1

you get missing in applymap (Invoice load)

etc........

3 Replies
MVP
MVP

Re: Mapping new values

create a tablebox with

Custnumber1

SalesmanG

inv_salesman

and check if  SalesmanG is null or blank for SE005037

it should be null if SE005037 is only in Invoice

better if you can post your data or just an extract to check the issue

Not applicable

Re: Re: Mapping new values

Hello Massimo,

se my app.

Håkan

MVP
MVP

Re: Re: Mapping new values

try to replace your Map_salesman1 with (change in bold)

Map_salesman1:

MAPPING LOAD

     Custnumber1,

     SalesmanG as Salesman1

Resident Customer_Read

where len(trim(SalesmanG))>0

;

why?

SE005037 is in Customer_Read table with blank SalesmanG

you load SE005037, blank in Map_salesman1

you get blank (not missing --> not SE999900) when you applymap in Invoice


with my change (bold) you esclude the blanks in Map_salesman1

you get missing in applymap (Invoice load)

etc........

Community Browser