I'm using InfoPath 2003 SP2.
I have a repeating table in an InfoPath form. When an item is selected in a drop-down (ddlTeamname) I want to automatically populate a textbox. The dropdown is filled by a secondary data source called "Contacts".
This does not work; it fills the textbox with the first element in the data source, no matter what is selected in ddlTeamname:
xdXDocument:GetDOM("Contacts")/dfs:myFields/dfs:dataFields/dfs:Contacts/@E-mail_Address[../@Full_Name = xdXDocument:get-DOM()/my:myFields/my:group1/my:group2/my:ddlTeamName]
From reading several posts on the site, I understand that I need to substitute "current()" for the call to "get-DOM" to get the value selected in the dropdown ddlTeamName. But, when I try using current() (like below) I get nothing in the textbox:
xdXDocument:GetDOM("Contacts")/dfs:myFields/dfs:dataFields/dfs:Contacts/@E-mail_Address[../@Full_Name = current()/my:myFields/my:group1/my:group2/my:ddlTeamName]
I've tried every possible path after current() (taking away each level one-by-one, until I'm calling "current()/my:ddlTeamname", but my textbox never fills.
Can anyone tell me what I'm doing wrong?