2 Replies Latest reply: Jul 17, 2015 7:42 PM by a d RSS

    Qlikview 11 Macro to select multiple values not working

      I am using the below Macro

       

       

      sub Test_Customer
      call Test("CustNo","Please type in CustomerNo(one by one):")
      end sub

       

       

       

      sub Test(byval vFeld,byval Meldung)
      Feld=vFeld
      Variable="vAuswahl" & vFeld

      ActiveDocument.CreateVariable Variable

      set v = ActiveDocument.Variables(Variable)
      Auswahl=v.GetContent.String

      xt = ActiveDocument.GetApplication.InputBoxEx(Meldung,Auswahl)

      set v = ActiveDocument.Variables(Variable)
      v.SetContent xt,true

      activedocument.fields(Feld).clear

       

      A=split(xt,chr(10))
      set f = ActiveDocument.Fields(Feld)
      set fv = f.GetNoValues 'empty array

      for i = lbound(A) to ubound(A)
      fv.Add
      'if isnumeric(A(i)) then
      ' fv(i).Number = A(i)
      ' fv(i).IsNumeric = true
      ' else
      fv(i).Text = A(i)
      fv(i).IsNumeric = false
      'end if
      next

      f.SelectValues fv

      end sub

       

       

      I have button - Run Macro Calling the Test_Customer.

      It worked before migration -I have provided value like

      1111

      1234

      6754

      8900

       

       

      After migration it is taking values

      1111123467548900

       

      Please advise if you have any details.

      Thank you in advance for your help.