Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2005

Tip: Looking for answers? Try searching our database.

Searching a secondary data source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Craigs714 - 10 Nov 2005 01:34 GMT
I have a large table that is read into memory (a secondary data source).  
After a field on a form is entered I want to validate the value against this
source.  I do not want to create a dropdown because the performance is slow
and because the data is fairly similar. ie. A001, A021, A299..., B002, B004,
B899 ..., C...

How do I validate or create a rule to see if there is a match.

Thanks
Franck Dauché - 10 Nov 2005 06:13 GMT
Hi,

Did you try to do it by code, by looping through the secondary DOM?

IXMLDOMDocument3 oSecondDoc =
(IXMLDOMDocument3)thisXDocument.DataObjects["tblTest"].DOM;
oSecondDoc.setProperty("SelectionNamespaces",
"xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\"
xmlns:d=\"http://schemas.microsoft.com/office/infopath/2003/ado/dataFields\"");

foreach (IXMLDOMNode oN in oSecDocNode.childNodes)
{
 if (oN.nodeType == DOMNodeType.NODE_ELEMENT)
 {
   IXMLDOMNode oField1 = oN.selectSingleNode("@fldTest");
 }
}
IXMLDOMNode oSecDocNode =
oSecondDoc.selectSingleNode("/dfs:myFields/dfs:dataFields");

Hope that it helps.

Regards,

Franck Dauché

> I have a large table that is read into memory (a secondary data source).  
> After a field on a form is entered I want to validate the value against this
[quoted text clipped - 5 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.