I have read many articles about this and used multiple versions of preceding-sibling with no luck. I am trying to accomplish the solution with no code if possible.
Goal: User goes to SharePoint to open up a form and enter metric actuals for all countries for the current period. The user wants to enter this info all at once.
Background: Custom InfoPath 2010 form sits on SharePoint 2010 list. Checked manage multiple list items with this form.
Solution: I populate three fields for the user in the form when the form is loaded. Three fields are drop-down controls in repeating section that pull their data from secondary data sources (all SharePoint lists). One of them populates country info. Two of them populate period info and metric info. The user will go to the form in SharePoint to enter country specific data for same metric and period. To make it easier for the user, I pre-populated 12 repeating sections. Each line item has unique country name but same metric and period. User selects the period and metric from the first repeating section and rest of the 11 repeating sections populates values from the first section. I used Default Values (Data->SharePoint Form Data->Default Values->myFields->dataFields->my:SharePointListItem_RW->FiscalPeriod-> Default value-> fx->Formula) to enter ../preceding-sibling::my:SharePointListItem_RW/my:FiscalPeriod in the Formula. Everything works FINE as expected in Preview for metric and period, but after publishing to the SharePoint, opening the drop-down for these two fields and selecting a value, everything gets overwritten to blank. What am I doing wrong? Please help.