Without doing code behind (i.e. just using standard InfoPath rules), is it possible to set a field's value based on an Xpath expression where that Xpath expression contains a reference to another field?
For example this xpath statement works for setting a field's value in a rule, but the "where" clause is hard-coded to 123:
xdXDocument:GetDOM("Data connection 1")/dfs:myFields/dfs:dataFields/dfs:myRecord[@ID = "123"]/@Title
This obtains the correct @Title value for the record where the @ID attribute is "123", but I need to replace "123" with some value in another field on the form that is bound to a different data source.
Is this possible without doing code behind and doing multiple queries against the different data sources?