I have a dropdown that pulls its source data from MSSQL. The dropdown populates various views based on the reference (RiskRef) that is selected in the dropdown. The dropdown is not inside a repeating section or table.
It works fine where there is only one line of item to display, but where there is a one to many relationship, I need to display the data in a repeating section. Unfortunately if I use the rule to set the field value based on the dropdown, it populates only the first line from the database. Thus all my repeating sections have only one entry. The SQL query is a secondary data source using a view (View_XXXXX). For example, if I have a risk called RISK1, it may have multiple controls attached to it: CTRL1, CTRL2, CTRL3, etc. Unfortunately it only displays CTRL1 and none of the others.
The setup looks like this:
View 1:
Dropdown of items (RiskRefDropDown)
View 2:
Risk information (all fields populated based on the @RiskRef and working fine). An example of a field set rule is:
xdXDocument:GetDOM("View_XXXXX")/dfs:myFields/dfs:dataFields/d:View_XXXXX/@GrossExp[../@RiskRef = xdXDocument:get-DOM()/my:CustomFields/my:RiskSection/my:RiskRefDropDown]
View 3:
Control information (all data reside in repeating sections, but it only displays the first row from the database). The backend database have multiple tables linked by a field called RiskRef. Because the view has multiple references to RiskRef, it has changed some of the fields to Expr instead. Thus an example of a field set rule is:
xdXDocument:GetDOM("View_XXXXX")/dfs:myFields/dfs:dataFields/d:View_XXXXX/@ControlOwner[../@Expr1 = xdXDocument:get-DOM()/my:CustomFields/my:RiskSection/my:RiskRefDropDown]
Is there something wrong with my XPath that it only displays one row in a repeating section? Or is there something else I need to do? Any assistance would be much appreciated!