17
Numeric with Total
Numeric
*NUMLISTTOTAL
Captures a list of numeric entries where one designated slot acts as the enforced total of all other entries. Each category slot accepts a numeric value with optional *MIN/*MAX range constraints. The Total slot is marked with *NMUL to make it exclusive and auto-calculated — the respondent cannot edit it directly. The system validates that the category entries sum correctly to the Total slot value before the respondent can advance.
Script Definition
script definition (.q)
-- *NUMLISTTOTAL: each category slot accepts a numeric entry. -- The Total slot uses *NMUL to mark it as auto-calculated and exclusive. -- *MIN and *MAX on each slot restrict the acceptable entry range per category. *QUESTION Q13 *NUMLISTTOTAL Q13. Enter monthly spend for each brand (BDT) 1:Food *MIN 100 *MAX 5000 2:Transport *MIN 50 *MAX 2000 3:Education *MIN 1000 *MAX 4000 4:House Rent *MIN 3000 *MAX 15000 5:Others *MIN 0 *MAX 5000 6:Total *NMUL *MIN 1000 *MAX 50000
Use in Expressions
expressions
sumof[Q13]>=5000 -- total monthly spend is 5000 BDT or above valueof[Q13.1]>=1000 -- Food spend is at least 1000 BDT valueof[Q13.4]>valueof[Q13.3] -- House Rent is more than Education spend valueof[Q13.6]<=30000 -- Total spend does not exceed 30000 BDT
Why *NMUL on the Total slot? *NMUL marks the Total row as exclusive and system-controlled. The respondent cannot manually edit the Total — it is automatically calculated as the sum of all category entries. This prevents the respondent from entering a false total that does not match the individual figures.
Why *MIN and *MAX per slot? Each category has its own realistic spending range. *MIN sets the lowest accepted value and *MAX sets the highest for that specific row. If the respondent enters a value outside the range, a validation error is shown and they cannot advance until corrected. This prevents implausible entries such as a House Rent of 1 BDT or Food spend of 1,000,000 BDT.
Why *MIN and *MAX on the Total slot? Even though the Total is auto-calculated, applying *MIN and *MAX to it enforces a sanity check on the grand total. For example, *MIN 1000 *MAX 50000 ensures the overall monthly spend falls within a believable household budget range, catching cases where category entries are individually valid but collectively unrealistic.
Use valueof[Q13.n] to reference a specific slot in come-logic or check conditions. For example, valueof[Q13.4]>10000 can route high-rent respondents to a follow-up question about housing type.
The slot number in valueof[Q13.n] corresponds to the option code in the script, not the display order. Ensure codes are assigned consistently.