Updating site content type failed infopath repeating
Next, create a subform (let’s call it “movie Data”) which contains fields with explicit bindings to the data nodes from the Movies In Cat data connection using the Binding tab in the Object palette.Also, add the Data Connection Controls object from the Connecting a Form to a Database sample to this subform (making the proper adjustments for the data connection name in each button’s Click event script) and make this subform invisible.In the Initialize event of the object, set the data connection name to “Movie Categories”, the hidden value column name to “cat Id” and the display text column name to “cat Name”.If you run the form at this point, you should get three values in the list: “Action”, “Comedy” and “Drama”.The key to achieving this functionality is to use two data connections.(It’s important to note here that while you may only have a single data connection which loads data from an you can access its properties just like you can get at the properties of the objects you place on your form.This is great if you want to iterate through all records one at a time and update them on an individual basis.
Finally, in the Data Drop Down List’s Change event, write a script which sets the statement used by the Movies In Cat data connection, opens the connection and displays the movie Data subform.First off, you can see that the general design of this User Defined Action (UDA) was done with a State Machine.The reason for this, is that it make it easier to come back later and make change to the workflow design, because the state have proper names that explain what the workflow logic in that branch does.In this sample, I’ve defined two data connections to the Movie Database: If you look at the node which contains information about the query currently being used by each data connection.That’s what we ultimately want to modify once the user picks a movie category: You should note that the query node’s command Type attribute value is very important. That’s because having data nodes with the names “id” and “name” in your data connection will give you a lot of headaches when attempting to iterate through the xfa.record.