Randomly Select 5 Cases from a dynamic valueset
Posted: March 30th, 2020, 5:30 pm
Hi CSPro Team,
I would like tp restrict the number of dynamic value set to 5 from set of eligible cases, I have a listing of HHs that I want to dynamically
show 5 eligible cases out of the many from a lookup in a menu program.
Please is it possible to restrict the number of HHs in the codes above or there is a better way to do it. Thanks for the support always.
I would like tp restrict the number of dynamic value set to 5 from set of eligible cases, I have a listing of HHs that I want to dynamically
show 5 eligible cases out of the many from a lookup in a menu program.
Code: Select all
onfocus
valueset hhVS;
forcase DVV_DICT where SELECT_CLUSTER=HCLUSTER and age > 18 do
// if …..endif //Random selection of 5 cases
hhVS.add(maketext(HHEAD) + " - " + strip(ADDRESS),HHNO);
endfor;
setvalueset(SELECTED_HH, hhVS);