-
Ah, my error -- perhaps we only get that option for a main connection that a form is based off of.
However, you can bind a regular section to a repeating group -- I only get the first row of my data back, but it does work....you can right click the group in the data source task pane, select More, and select Section with controls for example.
-
Not on the submit button -- I think you want to do this in Open rules. Under Tools / Form Options / Open and Save there is a place for rules that run on open.
-
What is your secondary data source? If it is SQL, in the wizard where you create the connection, there is a 'modify table' button that when you open it has a checkbox for 'multiple rows' (my labels may be off, don't have it open right now). If you deselect that, you won't have a repeating structure.
-
Why do you have to do it in code? I don't understand that requirement at all. I don't believe InfoPath gives us any programatic access to the controls on the form itself, only the fields bound to the form, so a coded solution may not be possible in this case.
-
I can't help but notice that in the code sample you've posted, you have exactly the same namespace as was defined in my sample. Since Infopath bases the namespace off the date and time the form was created, it seems unlikely we created our forms at exactly the same date and time.
One way to find the namespace for your form is to save it ...
-
I wonder if you accidentally deleted the namespace definition from the top of the script file. It looks like this (only your namespace would be different for your form):
// The following line is created by Microsoft Office InfoPath to define the prefixes // for all the known namespaces in the main XML data file. // Any modification to the form ...
-
Hi -- so you want no rows to be in the repeating table when the form opens? Under Tools, select Default Values. You can then remove the single node that is added by default to your repeating group when the form opens.
-
Hi:
As to thing #2 -- the answer is 'no', I'm afraid. You can create a form off a database, and then you will have the built in submit to database functionality that InfoPath provides. But the only way to submit to a database from a form that has already been created is going to be via code or a web service.
You could use the data ...
-
So it was working, pulling back all data, and then it stopped? But the library is set to display 1000? Try adding a new data connection to the same library as a test, or in a new form, again to test.
-
What line is the error on? This looks like it should be fine, if I compare it to this MSDN sample. As long as the XPath is right for each of the variables that you are setting with values from the form....