-
You might want to incorporate this function into your code. This is a function provided with common.js and ensures that your node is always normalized. It sounds like you need your node normalized every other record and not on the others.
/*------------------------------------------------------------------------------
normalizeSource() - ...
-
I got it to work.
Thanks for the info.
-
I'm hoping that in the 2005 version of InfoPath they allow us to use relative paths for sec data source.
-
this works
myLocationOffloadCode = e.Parent.selectSingleNode(''../@LocationOffloadCode'')
but it produces error msg for every other record returned.
It does function correctly, as far as I can see--I set the LocationOffloadCode to Nothing, and only that record gets set.
I can turn off the error message popup in the try statement and be ...
-
Yes, you can do this.
Your source might need to be ''normalized'' so try this line instead:
var idx = eventObj.Parent.selectSingleNode( ''@idavance'' );
The error that you listed - null or not an object - is almost always because your XPath is wrong. Check out this tutorial for a helpful start: ...
-
Haha, man that's depressing. Good luck and let us know if we can do anything else to help!
---------------
Matt Faus
InfoPath Dev Texas
-
If your drop-down list is already populating from the SQL DB then all you need to do is retrieve the rows from the DB and the drop-down will automatically populate. To do this, add this code to your OnLoad event handler:
XDocument.Query();
--OR--
XDocument.DataObjects(''Name of secondary data source'').Query();
These two bits of code are the ...
-
I'm sorry, I forgot that the Query was done on the main data connection. Check out the following code for some better info:
var oSecondary = XDocument.DataObjects( ''Name of Secondary Data source'' );
// One way to do it - set the query fields correctly then run query
oSecondary.DOM.selectSingleNode( ''.....'' );
oSecondary.Query();
// Another ...
-
i try this too:
var strUserName = eventObj.Source.selectSingleNode(''@idavance'').text);
IP, send me : Source.selectSingleNode(...)' is null or not is a object.
Is there a way to extract a piece of data in a field on the line that currently has the focus and then do a comparison with that single data point?
Fred Darwin Villareal
-
+ Me {OffloadRequestReview.OffloadRequestReview} OffloadRequestReview.OffloadRequestReview
- e {Microsoft.Office.Interop.InfoPath.SemiTrust.DataDOMEventWrapper} Microsoft.Office.Interop.InfoPath.SemiTrust.DataDOMEvent
+ [Microsoft.Office.Interop.InfoPath.SemiTrust.DataDOMEventWrapper] {Microsoft.Office.Interop.InfoPath.SemiTrust.DataDOMEventWrapper ...