Skip to main content Skip to complementary content

Using Automation for Dynamic Data Update

Dynamic Data Update provides a mechanism for making transactions with the in-memory data of QlikView in real-time using syntax similar to SQL. The field data is updated in real-time without running the script.

Examples

Example 1: Dynamic Data Update

Rem ** Dynamic Data Update ** sub Update SET Result = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Discount = 4 WHERE City = 'Stockholm'") if Result = false then MsgBox Result.ErrorMessage end if end sub sub Insert SET Result = ActiveDocument.DynamicUpdateCommand ("INSERT INTO * (Country, City) VALUES (DK, Copenhagen), (NO, Oslo)") if Result = false then MsgBox Result.ErrorMessage end if end sub sub Delete SET Result = ActiveDocument.DynamicUpdateCommand ("DELETE FROM CITY WHERE IsNull (Discount)") if Result = false then MsgBox Result.ErrorMessage end if end sub
Information noteIt is not possible to use If clauses within the data statement!

Example 2: Non-working example using If clauses

Rem ** This example using If clauses in data statement will not work ** sub UpdateIf SET Result = ActiveDocument.DynamicUpdateCommand ("UPDATE * SET Discount = if(Discount >= 35, 0, if (City='Stockholm', Discount + 5, Discount + 2)) WHERE Country = 'SE'") if Result = false then MsgBox Result.ErrorMessage end if end sub

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com