Count number of number visits (CAPI)

Discussions about CSEntry
Post Reply
prabhustat
Posts: 57
Joined: March 17th, 2012, 10:46 am

Count number of number visits (CAPI)

Post by prabhustat » March 21st, 2020, 1:19 pm

Hi

I want add number of visits in CAPI application , if any one have example.

Thanks in advance.

PP

Gregory Martin
Posts: 1290
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Count number of number visits (CAPI)

Post by Gregory Martin » March 24th, 2020, 10:16 am

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;

Post Reply