Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView 10 SR 4 Undocumented Workbench API Change - BodyOnLoadFunctionNames()

We recently upgraded from QlikView 10 SR3 to SR4 and noticed that our application stopped executing the onUpdate events for objects. The current documentation demonstrates the following...

<script type="text/javascript">

     var MyQvObject;

     MyListIsUpdated = function() {

          alert("Number of enabled values: " +

          MyQvObject.QvaPublic.Data.GetEnabled().length);

     }

     MyInit = function() {

          MyQvObject = qva.GetQvObject("LB1457", MyListIsUpdated);

     }

     Qva.BodyOnLoadFunctionNames.push('MyInit');  // notice the use of the name as a string

</script>

QlikView 10 SR 4 now requires actual functions not strings...

<script type="text/javascript">

     var MyQvObject;

     MyListIsUpdated = function() {

          alert("Number of enabled values: " +

          MyQvObject.QvaPublic.Data.GetEnabled().length);

     }

     MyInit = function() {

          MyQvObject = qva.GetQvObject("LB1457", MyListIsUpdated);

     }

     Qva.BodyOnLoadFunctionNames.push(MyInit);  // notice the use of the name as a string

</script>

You can also do this now...

<script type="text/javascript">

     var MyQvObject;

     MyListIsUpdated = function() {

          alert("Number of enabled values: " +

          MyQvObject.QvaPublic.Data.GetEnabled().length);

     }

     Qva.BodyOnLoadFunctionNames.push(function() {

          MyQvObject = qva.GetQvObject("LB1457", MyListIsUpdated);

      });  // just pass in the function

</script>

Labels (2)
0 Replies