I was trying to validate a drop down box entry versus a secondary connection that requires 2 filters, i.e. the selected cost code must be in the validation table FOR THE SELECTED PROJECT. The reason for the validation is that the validation table may change prior to submitting the form. The following expression ALWAYS indicates bad data ...
not(current()/@CostCode = xdXDocument:GetDOM("CostCodeDropDown")/dfs:myFields/dfs:dataFields/d:row/@CostCode[../@Project = current()/@Project and . = current()/@CostCode])
In trying to troubleshoot this, I came upon this unbelievable behavoir ... if I enter that expression into an "expression box" it behaves exactly as I would expect (i.e. correctly). If I enter the EXACT same expression as the default value of a text box, it ALWAYS indicates true.
Any thoughts??