I have a form that creates total mileage using a repeating table. The Miles control is populated from a SharePoint library when a company is chosen on the Infopath form. The first company works fine, but when I go to add another company, Miles duplicates the first company no matter what the company is. Here's the code for the Miles control:
xdXDocument:GetDOM("Company Mileage")/dfs:myFields/dfs:dataFields/dfs:Company_Mileage/@Mileage[(../@Company_Name = xdXDocument:get-DOM()/my:Technician_Mileage/my:Mileage/my:Client_Name) and (xdXDocument:get-DOM()/my:Technician_Mileage/my:Mileage/my:Override_Mileage != string(true()))]
Thanks in advance,