Hi
I want add number of visits in CAPI application , if any one have example.
Thanks in advance.
PP
Count number of number visits (CAPI)
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Count number of number visits (CAPI)
Here is code from one survey. We had a repeating record, ENUMERATION_TIMES_REC, that wasn't on any form and we updated it in logic when the case was opened:
// we need to make sure that we don't add too many rows to the record
if count(ENUMERATION_TIMES_REC) < maxocc(ENUMERATION_TIMES_REC) then
numeric enumeration_times_row = count(ENUMERATION_TIMES_REC) + 1;
insert(ENUMERATION_TIMES_REC(enumeration_times_row));
ET_START_TIMESTAMP(enumeration_times_row) = timestamp();
ET_INTERVIEWER_CODE(enumeration_times_row) = getoperatorid();
ET_DEVICE_ID(enumeration_times_row) = getdeviceid();
endif;
if count(ENUMERATION_TIMES_REC) < maxocc(ENUMERATION_TIMES_REC) then
numeric enumeration_times_row = count(ENUMERATION_TIMES_REC) + 1;
insert(ENUMERATION_TIMES_REC(enumeration_times_row));
ET_START_TIMESTAMP(enumeration_times_row) = timestamp();
ET_INTERVIEWER_CODE(enumeration_times_row) = getoperatorid();
ET_DEVICE_ID(enumeration_times_row) = getdeviceid();
endif;