<?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 Dynamicupdate used on QV server with multiple users in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamicupdate-used-on-QV-server-with-multiple-users/m-p/1246872#M1251192</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;I develop a QV report which has a macro doing calculation and upload the results to tables by using Dynamicupdate INSERT command.&lt;/P&gt;&lt;P&gt;A chart is referring to this tables and reflects the uploaded results on the fly.&lt;/P&gt;&lt;P&gt;This QV report works fine on PC stand alone as well as on a server.&lt;/P&gt;&lt;P&gt;Users can access the report, run macro and upload data from an Ajax client with no problem.&lt;/P&gt;&lt;P&gt;However, we recently found out that the table data and chart will be corrupted if more than one user have session.&lt;/P&gt;&lt;P&gt;We are guessing that the table residing in the server memory is shared among users if there are multiple clients having sessions and running macros at the same time.&lt;/P&gt;&lt;P&gt;How to resolve this kind of issue?&lt;/P&gt;&lt;P&gt;Actually, I've tried to add an user ID field to the table so that the records inserted associated with the users, and I set analysis to get the data set based on the user ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In loading script, a variable keeps user ID&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Let vUser=OSUser();&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and add a field UID to table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;data_tbl:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;UID, ttfwk_fit, fir_fit, dr_fit&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In macro, the user ID variable vUser is passed to macro as&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;set v =ActiveDocument.Variables("&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;EM&gt;vUser&lt;/EM&gt;&lt;/STRONG&gt;")&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; userID =v.GetContent.String&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In macro, the insert command is used to upload results where ttf(i), accufir(i) and fir(i) are calculation results done by VB code in&amp;nbsp; the&amp;nbsp; macro&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insertString = "INSERT INTO data_tbl (UID,ttfwk_fit,fir_fit,dr_fit) VALUES (" &amp;amp; userID &amp;amp; "," &amp;amp; ttf(i) &amp;amp; ","&amp;nbsp; &amp;amp; accufir(i) &amp;amp; "," &amp;amp; fir(i) &amp;amp; ")"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;set result = ActiveDocument.DynamicUpdateCommand(insertString)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression used in the chart. The set analysis sets the only UID = vUser data:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;=log(log(1/(1-only({&amp;lt;UID={'$(&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;EM&gt;vUser&lt;/EM&gt;&lt;/STRONG&gt;)'}&amp;gt;}fir_fit))))&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution doesn't work for multiple users.&lt;/P&gt;&lt;P&gt;We realized that the vUser will tied to the user who launches the qvw on serve at the first time.&lt;/P&gt;&lt;P&gt;How can I get the User ID dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2026-01-26T18:19:17Z</dc:date>
    <item>
      <title>Dynamicupdate used on QV server with multiple users</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamicupdate-used-on-QV-server-with-multiple-users/m-p/1246872#M1251192</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;I develop a QV report which has a macro doing calculation and upload the results to tables by using Dynamicupdate INSERT command.&lt;/P&gt;&lt;P&gt;A chart is referring to this tables and reflects the uploaded results on the fly.&lt;/P&gt;&lt;P&gt;This QV report works fine on PC stand alone as well as on a server.&lt;/P&gt;&lt;P&gt;Users can access the report, run macro and upload data from an Ajax client with no problem.&lt;/P&gt;&lt;P&gt;However, we recently found out that the table data and chart will be corrupted if more than one user have session.&lt;/P&gt;&lt;P&gt;We are guessing that the table residing in the server memory is shared among users if there are multiple clients having sessions and running macros at the same time.&lt;/P&gt;&lt;P&gt;How to resolve this kind of issue?&lt;/P&gt;&lt;P&gt;Actually, I've tried to add an user ID field to the table so that the records inserted associated with the users, and I set analysis to get the data set based on the user ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In loading script, a variable keeps user ID&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Let vUser=OSUser();&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and add a field UID to table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;data_tbl:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;UID, ttfwk_fit, fir_fit, dr_fit&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In macro, the user ID variable vUser is passed to macro as&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;set v =ActiveDocument.Variables("&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;EM&gt;vUser&lt;/EM&gt;&lt;/STRONG&gt;")&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; userID =v.GetContent.String&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In macro, the insert command is used to upload results where ttf(i), accufir(i) and fir(i) are calculation results done by VB code in&amp;nbsp; the&amp;nbsp; macro&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insertString = "INSERT INTO data_tbl (UID,ttfwk_fit,fir_fit,dr_fit) VALUES (" &amp;amp; userID &amp;amp; "," &amp;amp; ttf(i) &amp;amp; ","&amp;nbsp; &amp;amp; accufir(i) &amp;amp; "," &amp;amp; fir(i) &amp;amp; ")"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;set result = ActiveDocument.DynamicUpdateCommand(insertString)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression used in the chart. The set analysis sets the only UID = vUser data:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;=log(log(1/(1-only({&amp;lt;UID={'$(&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;EM&gt;vUser&lt;/EM&gt;&lt;/STRONG&gt;)'}&amp;gt;}fir_fit))))&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution doesn't work for multiple users.&lt;/P&gt;&lt;P&gt;We realized that the vUser will tied to the user who launches the qvw on serve at the first time.&lt;/P&gt;&lt;P&gt;How can I get the User ID dynamically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamicupdate-used-on-QV-server-with-multiple-users/m-p/1246872#M1251192</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
  </channel>
</rss>

