-
It looks like you still have filters on both repeating sections in the TOC.
Once the filters are removed, the default value of TOC/TOCgroup/AutoNumber should be:
count(../preceding-sibling::my:TOCgroup/my:AutoNumber) + count(../preceding-sibling::my:TOCgroup/my:group2/my:field1) + 1
-
It looks like you are missing an end-parenthesis right before the div.
-
If the listbox is already being populated from the SharePoint list, then there is no need to add any extra XML. The data is already there. You just need to have your code access the values from your secondary data connection instead of the ListBox's bound node. If you're unsure how to do this I can show you sometime ...
-
There are a number of different ways that a field can be set as "required."
Some are set in the schema (.xsd) file. If a field must be present it will have its minOccurs attribute set to 1 instead of 0.
If a string type is set as "cannot be blank," it will be set as type requiredString instead of xsd:string, and ...
-
What are you using as the data source for the values in the list box? Are they values you manually entered in the form designer? In InfoPath the value of a node bound to a list box is the value of the selected values. Since it is an input control I'm sure you will agree that this does make sense.
If you want to also ...
-
I'm a bit confused about what you are trying to do on the TOC page. You have a filter set to only display rows where SectionTitle is equal to "Administrative Services", but you are allowing users to insert rows and select the SectionTitle from a dropdown box. This is a bit of a contradiction.
The reason the numbers are ...
-
Please change the default value of DepartmentSection/Services/AutoNumber to:
count(../../../preceding-sibling::my:RepeatingServices//my:AutoNumber) + count(../../preceding-sibling::my:DepartmentSection//my:AutoNumber) + count(../preceding-sibling::my:Services//my:AutoNumber) + 1
Change the default value of ...
-
To select the last row (most recently added) in a repeating group, you can use the XPath last() function, so if the path to your repeating group was /my:myFields/my:group1/my:group2, you could do something like this:
XDocument.View.ExecuteAction "xCollection::insert", "group2_44"
Set ...
-
Yes, thank you. I just noticed that your code is in an OnAfterChange event handler, so you don't need a loop.
Please try the following:
Replace
empid = XDocument.DOM.selectSingleNode("//my:Prefix").Text
with
empid = eventObj.Site.text
And ...
-
Ok, please try putting this code in the event handler for a button. You will need to change the underlined parts. The first underlined part corresponds to the path of the field where the user will enter the count, and the second is the path of the repeating group on your form:
XPathNavigator mainDataNavigator = ...