Page 1 of 1
Count number of number visits (CAPI)
Posted: March 21st, 2020, 1:19 pm
by prabhustat
Hi
I want add number of visits in CAPI application , if any one have example.
Thanks in advance.
PP
Re: Count number of number visits (CAPI)
Posted: March 24th, 2020, 10:16 am
by Gregory Martin
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;