Count number of number visits (CAPI)

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

Count number of number visits (CAPI)

Post by prabhustat »

Hi

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

Thanks in advance.

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

Re: Count number of number visits (CAPI)

Post 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;
Post Reply