3 Replies Latest reply: Dec 22, 2015 9:33 AM by Rupesh Bharadwaj RSS

    load existing field in table in subroutine

    Rupesh Bharadwaj

      I have two excel files and these have field names invoice number and Invoice amount. Invoice amount is termed as amount in one file and Money in another file. I have written a subroutine to load both the excel files in qlikview and I want to specify "if field name is amount then load amount otherwise look for Money and load the existing field as Invoice amount". One file can have either field name amount or Money. I am not sure which function should be used in load script. FieldNumber function can't be used as it must not reference the table currently being loaded. I don't want to use ScriptError function.


       

      file1
      invoice numberamount
      a1
      b2
      c3
      d4


       

      file2
      invoice numberMoney
      e12
      f13
      g14
      h15


      Any help is much appreciated.