Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
maxgro
MVP
MVP

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........

View solution in original post

3 Replies
maxgro
MVP
MVP

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
Author

Hello Massimo,

se my app.

Håkan

maxgro
MVP
MVP

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........