Setting the occurence label of a roster before entering the roster
Posted: June 6th, 2018, 10:08 am
Hi,
I want to display names of persons on the occurrence labels when opening a case that has been previously entered. This way I'll see names instead of population(1), population(2) etc when opening a case in android. I've tried the following:
I tried both totocc() and count() but It turns out that both of them evaluate to 0 until I actually enter the roster. This results in all the occurrence labels being changed to only the name of the first person. Is there a way to get the total number of roster items or to loop through all the roster items?
I want to display names of persons on the occurrence labels when opening a case that has been previously entered. This way I'll see names instead of population(1), population(2) etc when opening a case in android. I've tried the following:
Code: Select all
PROC PART_A //This is the level proc
onfocus
do i = 1 while i <= totocc(POPULATION000) //DEBUG: totocc and count both return 0 if executed before the roster that they are referring to
setocclabel(POPULATION000(i), strip(FIRST_NAME(i))); //first roster
setocclabel(POPULATION001(i), strip(FIRST_NAME(i))); //second roster
enddo;