I have an InfoPath form that was correctly querying a SharePoint 2007 list to retrieve a value based on matching data from the main form and the SharePoint list. But now it is not working with SharePoint 2013 and only works if the match is on the first row of the SharePoint list. I want to get a value from the SharePoint list if 2 field values on the SharePoint list match 2 values on the main form. Here is my XPath:
xdXDocument:GetDOM("Finance Competency Assessment 2")/dfs:myFields/dfs:dataFields/dfs:Finance_Competency_Assessment_2/@Rating[. = xdXDocument:get-DOM()/my:myFields/my:SubmitFields/my:Rating and ../@Manager_Name = xdXDocument:get-DOM()/my:myFields/my:SubmitFields/my:ManagerName]