I have a form with where main view has a number of drop-down controls that are populated from a SQL database. The values for those fields are just index numbers to tables with the drop-down display names being more descriptive. I then created a separated view for printing so that the printed form just had text boxes instead of printing the drop-down controls. But, on the print view I wanted to display the more descriptive drop-down display name values instead of the index value of the forms field. I was able to do this by using an expression box that pulled the display name value from the secondary data source filtered so that the secondary data index field is equaled to the value of the form's field. Below is an example of the XPath from one of the expression boxes:
xdXDocument:GetDOM("tblManufacturers")/dfs:myFields/dfs:dataFields/d:tblManufacturers/
@MfgName[../@MfgID = xdXDocument:get-DOM()/my:ServerForm/my:Manufacturer]This worked great until I had a drop-down in a repeating section of table. At that point the XPath was just getting value of the field in the first section or row and all the repeating fields on the print view have the same value.
Here is the original XPath i tried in a repeating table:
xdXDocument:GetDOM("tblkEMCType")/dfs:myFields/dfs:dataFields/d:tblkEMCType/
@EMCName[../@EMCID = xdXDocument:get-DOM()/my:ServerForm/my:VolumeTable/my:Volume/my:EMCVol_]Is there a way I can change this so it gets the index value from the appropriate section or row?
Thanks,
Rob