logo SmartSurvey / Scripting Docs
Back to Docs
Built-in Function
subtractof[Qa,Qb] Arithmetic

Returns the result of subtracting the response of Qb from the response of Qa (Qa minus Qb). Use for difference calculations between two numeric questions.

Parameters
Parameter Type Description
Qa Question ref Minuend — value to subtract from
Qb Question ref Subtrahend — value to subtract
Returns: Number — Qa minus Qb
Examples
expressions
subtractof[Q4,Q5]>=0     -- Q4 value is at least as large as Q5
subtractof[Q10,Q11]>=5   -- Q10 is at least 5 more than Q11
Both Qa and Qb must be numeric questions or produce numeric values.
Related