Professional > Interview scripting > Sample management > Sample management facilities > Quotas > How to write a quota control system > Processing records returned after interviewing
 
Processing records returned after interviewing
When a project uses quota control without sample management, UNICOM Intelligence Interviewer - Server automatically converts pended interviews to completed or rolled back interviews depending on the results of the quota tests. When a project uses quota control with sample management, the QuotaAutoCommit property controls what happens to pended quota cells. If QuotaAutoCommit is True (or 1) then pended quotas either increment the count of completed interviews or are rolled back; if the property is False (or 0) nothing happens automatically and all actions must be specified in the sample management script. This applies even if all quotas are based only on interview data.
QuotaAutoCommit defaults to True, so the processing of pended quotas is dealt with automatically at the ends of interviews.
Note QuotaAutoCommit is not added to a project's properties in DPM when you create a project, but you may add it afterwards using Edit Project. Refer to "Adding Project Properties" in the Edit Project section of UNICOM Intelligence Interviewer - Server Admin User's Guide for details.
Whenever QuotaAutoCommit is False, you should include statements such as those shown below in the ReturnSampleRec function in your sample management script.
If (SampleRecReturnCode.Code=1 Or SampleRecReturnCode.Code=6) Then
  QuotaEngine.Complete()
Else
  QuotaEngine.Rollback()
End If
Using this code, interviews that terminated successfully, either a fully or partially completed interviews have their pending counts decremented by 1 and their corresponding completed counts incremented by 1. All other interviews have their pending counts decremented by 1 and their corresponding rollback counts incremented by 1. For further information about QuotaEngine.Complete and QuotaEngine.Rollback, see Quota Object model.
See also
How to write a quota control system