Searching a secondary data source

C

Craigs714

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
 
F

Franck Dauché

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é
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top