Professional > Interview scripting > Sample management > Sample management facilities > Quotas > How to write a quota control system > Checking quota return codes and other information
 
Checking quota return codes and other information
When you pend quotas, the quota control system returns various information about the success or failure of the request and about the current quota status. You can check this information in your sample management script by using the following constants:
Constant
Description
QUOTA_RESULT_WasPended
Cells were pended for this respondent.
QUOTA_RESULT_OverTarget
At least one cell for this respondent is over target.
QUOTA_RESULT_BelowTarget
At least one cell for this respondent is below its target.
QUOTA_RESULT_PendingOverTarget
Cells for this respondent have been pended but at least one of them will go over quota if the respondent successfully completes the interview.
Note Exactly when these constants are set depends on the quota type. For example, a Normal quota does not allow an interview to be pended if completing that interview would cause the target to be exceeded.
The following less commonly used constants are also available for checking the quota type and how a quota has been defined in Quota Setup:
Constant
Description
QUOTA_FLAGS_None
This is a Normal quota.
QUOTA_FLAGS_AllowOverQuota
This quota allows cells to be pended as long as the target has not been met. If all pended interviews complete, the target will be exceeded.
QUOTA_FLAGS_Counter
This quota counts respondents but does not implement any quota control.
QUOTA_TYPES_TableQuotas
This quota was set up as a Table Quota.
QUOTA_TYPES_ExpressionQuotas
This quota was set up as an Expression Quota.
See also
How to write a quota control system