Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

applymap number v text

Hi

In my script I have the following

load [Supplier Number],
applymap ('MissingSupplierMap',[Supplier Number],'No Data') as [Supplier]
resident 'Table';

I think that the [Supplier Number] field in 'Table' is text and the [Supplier Number] in the mapping table is a number.  I'm sure this worked previously but now it is returning 'No Data' for all the supplier numbers.  Is it because one is text and the other is a number?

Thanks

A

4 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

Actually QlikView trying to convert to number from text in every possible opportunity, and I reproduced behavior which you described only by explicit conversion to Text() inside ApplyMap() function... You can resolve this issue using explicit conversion to numeric via num() function.

load [Supplier Number],
applymap ('MissingSupplierMap',Num([Supplier Number]),'No Data') as [Supplier]
resident 'Table';

Hope this helps.

Regards,

Andrei

SergeyMak
Partner Ambassador
Partner Ambassador

Hi Adrian,

Try to find a definition of MissingSupplierMap.

It should be like

MissingSupplierMap:

MAPPING LOAD...

If you don't have this definition you will have 'No data' as result of applymap ('MissingSupplierMap',[Supplier Number],'No Data') as [Supplier]

The second thing is if you have the definition of MissingSupplierMap map, try to load it as a normal table (without MAPPING) and compare the first field with [Supplier Number].

You will see if something wrong.

Regards,

Sergey

Regards,
Sergey
Anonymous
Not applicable
Author

have you checked you have matching Supplier Number in both tables.

if yes , try to load you data with num(trim([Supplier Number]))  in script the  use apply map

robert_mika
Master III
Master III

Post your data.app if your still in doubt