Hi, I'm developing a form that should do a calculation using DateDiff. Some preliminary information: the form is injected with qRules, but is also Full Trust and using code, specifically C# code on a button click event.
Here is how my rule is defined: it's on the calendar control, based on a field with a Date datatype. The condition is to execute when the field changes. I'm setting the qRules data source Command field to concat("DateAdd /xpath=/my:RequestForTimeOff/my:LeaveRequested/my:BeginDate /", UnitType, "=", NbrUnits) where UnitType is either hours, days, or weeks, and NbrUnits is an integer. The command is defined in the formula builder window of the value field. The command is intended to populate another date field with the results, as in "Set a field's value: EndDate = Result", result from the qRules data source.
The problem is when I test in Preview mode, the rule doesn't appear to execute. I've dragged the Success, Result, and Error fields onto my view and nothing appears.
What might I be missing? Can qRules not be used when code is in the form?