2 Replies Latest reply: Jun 30, 2010 7:37 AM by Dario Partenope RSS

    Simple DynamicUpdateCommand test fails

      Hi,

       

      here is the test setup:

       

      inputfield flag;

      LOAD * INLINE [

      id,F1, F2, index,flag

      id1,11, 21, 0,0

      id2,12, 22, 1,0

      id3, 13, 23, 2,0

      id4,13,24,3,0

      ];



       

       

      sub Update

      'SET Result = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Discount = if(Discount >= 35, 0, if (City='Stockholm', Discount + 5, Discount + 2)) WHERE Country = 'SE'")

      SET Result = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET flag = 1") 'stops here selecting the line

       

      if Result = false then

      MsgBox Result.ErrorMessage

      end if

      end sub



       

      Runing the macros doesn't have any effect (i.e. 'flag' field stays unchanged). Actually the macros seems to run until the ActiveDocument.DynamicUpdateCommand line. it stops there selecting the line. During macros debuging, emty message window with 'Ok' button pops up.....

       

      I use the QlikView 9 last update Personal edition

       

      Any suggestions are appreciated

       

      Thanks

      vlad