Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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 (1)
0 Replies