I have code that will connect to a SharePoint InfoPath forms library. In this library are 5 forms, each of which are defined as a content type. I need to have code retrieve information from the column based on form and the month and year of the form. For some reason this code will not retrieve the data. The library has a space in the name and each of the forms are grouped in sub folders in the library. The code below should set the value with the value in the form library but currently it does nothing. The library in SharePoint is called WCF Reporting and the sub folder is called Employer Service Reporting. Is it an issue with the sub folder? Is it an issue with the spaces?
DataSource DS = this.DataSources["WCF Reporting"];
try { LevSatWithWCFServ = DS.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/dfs:WCF_Reporting[@ReportMonth='" + ReportMonth + "' and @ReportYear='" + ReportYear + "' and @Content_Type='" + ContentType + "']/@LevSatWithWCFServ", NamespaceManager).Value; }
catch { }