<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DynamicUpdateCommand in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327394#M708171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry if this has been asked before but I am having a problem with the DynamicUpdateCommand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to update a field called value to it's value + 1, &lt;SPAN style="font-size: 10pt; line-height: 115%; font-family: Arial, sans-serif;"&gt;eventually &lt;/SPAN&gt;it will be more complicated than this but I cannot get even this basic operation to work.&lt;/P&gt;&lt;P&gt;My code inside a macro is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Update&lt;/P&gt;&lt;P&gt;set result1 = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Value = Value + 1 Where IDVal = 'CC_145'")&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this does nothing, however if I remove the Value + parts it does update to 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Update&lt;/P&gt;&lt;P&gt;set result1 = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Value = 1 Where IDVal = 'CC_145'")&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above does work does not achieve what we need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be great!&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;BR /&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Dec 2011 18:13:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-28T18:13:04Z</dc:date>
    <item>
      <title>DynamicUpdateCommand</title>
      <link>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327394#M708171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry if this has been asked before but I am having a problem with the DynamicUpdateCommand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to update a field called value to it's value + 1, &lt;SPAN style="font-size: 10pt; line-height: 115%; font-family: Arial, sans-serif;"&gt;eventually &lt;/SPAN&gt;it will be more complicated than this but I cannot get even this basic operation to work.&lt;/P&gt;&lt;P&gt;My code inside a macro is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Update&lt;/P&gt;&lt;P&gt;set result1 = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Value = Value + 1 Where IDVal = 'CC_145'")&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this does nothing, however if I remove the Value + parts it does update to 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Update&lt;/P&gt;&lt;P&gt;set result1 = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Value = 1 Where IDVal = 'CC_145'")&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above does work does not achieve what we need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be great!&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;BR /&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 18:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327394#M708171</guid>
      <dc:creator />
      <dc:date>2011-12-28T18:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: DynamicUpdateCommand</title>
      <link>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327395#M708172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Hi Chris,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Which version of QV are you using? Please can you post the sample document? It will be easy for me to test.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Thanks - DV&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;www.qlikshare.com&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 20:29:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327395#M708172</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-12-28T20:29:27Z</dc:date>
    </item>
    <item>
      <title>DynamicUpdateCommand</title>
      <link>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327396#M708173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DV,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I have added my development file to the question.&lt;/P&gt;&lt;P&gt;I am using QV 10 SR3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for any help you can offer,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 21:16:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327396#M708173</guid>
      <dc:creator />
      <dc:date>2011-12-28T21:16:25Z</dc:date>
    </item>
    <item>
      <title>DynamicUpdateCommand</title>
      <link>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327397#M708174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I wondered if anyone could help with this and I am still confused as to what I am doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 10:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327397#M708174</guid>
      <dc:creator />
      <dc:date>2012-01-03T10:18:20Z</dc:date>
    </item>
    <item>
      <title>DynamicUpdateCommand</title>
      <link>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327398#M708175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Try with this module :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub increaseValue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vChosenId = ActiveDocument.GetVariable("vChosenId").GetContent.String&lt;/P&gt;&lt;P&gt;vChosenIdValue = CInt(ActiveDocument.GetVariable("vChosenIdValue").GetContent.String)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query="UPDATE Data SET value = "&amp;amp;vChosenIdValue+1&amp;amp;" Where id = '"&amp;amp;vChosenId&amp;amp;"'"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set sqlerror=ActiveDocument.DynamicUpdateCommand(query)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (sqlerror = false) then ' send message when error&lt;/P&gt;&lt;P&gt;MsgBox sqlerror.ErrorMessage&lt;/P&gt;&lt;P&gt;exit sub&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And create 2 variables : 1 which store the chosen id and 1 which store the value for the chosen id (easy to create with function Only and a Set Analysis)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 13:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DynamicUpdateCommand/m-p/327398#M708175</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2012-01-04T13:14:39Z</dc:date>
    </item>
  </channel>
</rss>

