First, there are at least two typos in the qRules v4.2 User Guide 2012-09-05.pdf documentation. On page 9 of 87, the DateDiff example for concat is missing a comma after the first element and the quotes in the document are smart quotes so they don't copy-and-paste well into InfoPath. http://www.howtogeek.com/wiki/Disable_Smart_Quotes_in_Word_2007
Second, I am not able to get DateDiff to work with the /resultxpath switch. My target field for the results is in my Main data source.
Attempt: concat("DateDiff /date1=", settlementDate, " /date2=", ., " /component=days /resultxpath=", calcSettlementDateMinusMaturityDate)
Result: Calculation result is sent to the qRules Result node and not the target field, no errors
Attempt: concat("DateDiff /date1=", settlementDate, " /date2=", ., " /component=days /resultxpath=/my:debtNote/my:helperFields/my:calcSettlementDateMinusMaturityDate")
Result: Calculation result is sent to the qRules Result node and not the target field, no errors
Am I missing something with the syntax?