Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Apply Map

Hi friends

I have following script in respect of apply map command

Mapsalvage:

     Mapping Load   CLAIM_N0, SALVAGE From e:\SALVAGE.qvd

     (qvd) ; 

ALL:

                Load *,

          ApplyMap(' Mapsalvage',CLAIM_NO, null()) as SALVAGE

          Resident MC;

      

DROP TABLE MC;

This script runs well but no data is returned for the field SALVAGE. Salvage is a numeric value. Is it not possible to add a numeric value in apply map. If so what should I do

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Firstly, you need to remove the leading space in the map name:

     ApplyMap(' Mapsalvage',...    should be ApplyMap('Mapsalvage',...


That may solve the problem. If not, check that the values of CLAIM_NO in Salvage.qvd and the resident table intersect. You have assigned null as the default so if the resident value is not found in the map, ApplyMap will return a null. Pay attention to the fomatting of the values in the two sources.


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
ashfaq_haseeb
Champion III
Champion III

Hi, do you have CLAIM_NO filed in ALL table which you loaded from Resident MC;

Regards

ASHFAQ

sushil353
Master II
Master II

Hi ,

Try below one:

ApplyMap(' Mapsalvage',CLAIM_NO,' ') as SALVAGE

HTH

Sushil

upaliwije
Creator II
Creator II
Author

Yes

martinpohl
Partner - Master
Partner - Master

Is this the original script?

One you wrote Claim_N0, twice Claim_NO (the first one is a 0 (null), the second an O (o).

At the applymap there is a blank bewteen ' and the table name.

For test write 'test' instead of null at the apply-line.

If the field i sfilled with 'test' the compared field (Claim_NO) is an matching.

If there are no values the applytable is not found.

Unfortunately there is no error message on this.

Regards.

ashfaq_haseeb
Champion III
Champion III

Hi,

If somehow you rename

CLAIM_NO as Sometext in your MC  Table


Then use as below

ApplyMap('Mapsalvage',Sometext, null()) as SALVAGE


Remove space before ' Mapsalvage'

Let me know if that worked


Regards

ASHFAQ


jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Firstly, you need to remove the leading space in the map name:

     ApplyMap(' Mapsalvage',...    should be ApplyMap('Mapsalvage',...


That may solve the problem. If not, check that the values of CLAIM_NO in Salvage.qvd and the resident table intersect. You have assigned null as the default so if the resident value is not found in the map, ApplyMap will return a null. Pay attention to the fomatting of the values in the two sources.


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
upaliwije
Creator II
Creator II
Author

Thanks all