4 Replies Latest reply: May 20, 2015 4:39 AM by Robert Mika RSS

    applymap number v text

    Adrian Buzer

      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

       

        • Re: applymap number v text
          Andrei Kaliahin

          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

          • Re: applymap number v text
            Sergey Makushinsky

            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

            • Re: applymap number v text
              balkumar chandel

              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

              • Re: applymap number v text
                Robert Mika

                Post your data.app if your still in doubt