Hello all,
I am trying to retrieve specific rows from sharepoint only when a specific value in infopath equals a specific value in SharePoint.
Here is a piece of code
XPathNavigator secDSNav = DataSources["SharePoint Data"].CreateNavigator();
string test = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Car/my:Car_Model"_IP", NamespaceManager).Value;
// Retrieve the rows of the secondary data source
XPathNodeIterator rows = secDSNav.Select("/dfs:myFields/dfs:dataFields/dfs:SPData[@Car_Model_SP = 'test']", NamespaceManager);
It works fine if i change the[@Car_Model = 'test']", by a real value that exists in the list, e.g [@Car_Model = 'bmw']", but I cant filter using the variable test.
Do you have any ideas?
Thanks