3 Replies Latest reply: Jul 9, 2013 2:21 AM by vikas mahajan RSS

    doubts about apply map

    vikas mahajan

      Dear all

      here apply map allows us to take one primary key and value while loading data into qlikview for e.g following code


      mapping load * inline [

      ID, Textvalue

      1, one

      2, two

      3, three ] ;


      ApplyMap ( 'map1', 1, 'xxx' ) It will return 'one'

      ApplyMap ( 'map1', 2 ) It will return 'two'

      ApplyMap ( 'map1', 4 ) It will return 4

      ApplyMap ( 'map1', 5, 'No result' ) It will returns No result



      But whether it is possible to put composite key in while loading applymap  for e.g    I have field  SalesGrp+HQID

      and its targets then whether it is possible to load with composite key (salesgrp+hqid) in apply map ?



      Thanks in adv.



        • Re: doubts about apply map
          Francisco Orte

          Hi Vikas :


          As you can guess from the manual, a mapping load only consider two fields. One is the key and the other the value as you have explained perfectly.

          If you need a composite key just create it concatenating both fields in order to create an unique key. For example yo can create Salesgrp & ' .. ' & Hqrd.


          Hope that helps.


          Best regards

          • Re: doubts about apply map
            Mohit Sharma

            no you can't do this through applymap

            it based on primary key

            but for that you can create a field  SalesGrp &'-' &HQID as Primary

            and use that field and on above side write field there it become easier for matching and if values doesn't match then

            the same value it is coming or you make it null also like

            ApplyMap ( 'map1', ID, '#N/A' ) It will return matching data with name and else #N/A