-
Make your drop-down be populated from a data source (rather than hard-coded values). Then your code will just remove all the nodes that are used as drop-down values, and replace them with new nodes. It's just XML DOM manipulation.
-
You should just be able to make a hyperlink to the XSN file in your task pane (or open it using code). And then have your task pane JS code call into main form code to have it do the setdirty/close.
-
The data source task pane unfortunately does not show all the namespaces. If you are using InfoPath 2007, a useful new feature I requested was implemented by the IP dev team which allows you to right-click on the field of interest and copy the complete XPath to that field to the clipboard. If you are using InfoPath 2003, then you should extract ...
-
You should look at using the OnContextChanged event.
-
Hi. I don't understand this part: "using a custom or datasheet list". What do you mean by those choices? A cascading list is done using the List Box control or the Drop-Down List Box control.
-
I was thinking more along the lines of:
DateTime date1 = thisXDocument.DOM.selectSingleNode("my:Date1");
DateTime date2 = thisXDocument.DOM.selectSingleNode("my:Date2");
TimeSpan diff = date2.Subtract(date1);
int days = diff.Days; // Whole days (i.e. '5').
double fdays = diff.TotalDays // Whole + fractional days ...
-
Great! Glad to hear you got it working. Good sluething!
-
Verify that uCalendarDataSource is actually a valid object.Get just the object without trying to access the .text property:
uHolidayDate = uCalendarDataSource.selectSingleNode("/dfs:myFields/dfs:dataFields/d:HolidayCalendar/@BankHolidayDate")Check whether uHolidayDate is a valid object.My guess is that uHolidayDate is not ...
-
Repeating tables are only a visual representation of the XML data they are bound to.
To add a new row, use your code to insert a new row into the XML DOM.
So, for example if you have:
<Table>
<Row attr1="" attr2="" attr3=""/>
<Row attr1="" ...
-
You are trying to get to a property of a null object: {NODE}.text, where {NODE} is the selectSingleNode stuff, and the .text is the property on that node.
If {NODE} is null, then accessing .text is invalid.
So your test should be:
if (selectedNode.selectSingleNode("Translation") == null)