Community articleXMLModelUpdate function
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


This function updates the XML data model in the form. This is necessary if computes have changed the structure of the data model in some way, such as changing or adding bindings. These sorts of changes do not take effect until the XMLModelUpdate function is called.


   Sub XMLModelUpdate()


There are no parameters for this function.


Returns nothing if the call is successful, or throws an exception if an error occurs.


The following example uses SetLiteralByRefEx to change a binding in the form, so that it binds to a different option. It then calls XMLModelUpdate so that the data model reflects the change.
The sample code uses setLiteralByRefEx to change the binding in the form, then calls xmlModelUpdate so that the XML data model reflects the change.
   Function ChangeBinding(Form)
      ' Change the binding to a field on the second page.
      Form.SetLiteralByRefEx vbNullString, _
         "[0][boundoption]", 0, _
         vbNullString, Nothing, "PAGE2.NameField.value"
      ' Update the XML model.
   End Function

Parent topic:
FormNodeP functions