PROC Q2
preproc
valueset string vs1;
do numeric i=1 while i<=length(strip(Q1))
if not ischecked(Q1[i:1], Q1) then
vs1.add(getlabel(Q1, Q1[i:1]), Q1[i:1]);
endif;
enddo;
setvalueset(Q2, vs1);
PROC SecondQues
onfocus
valueset string selectMulti;
do numeric ctr = 1 while ctr <= FirstQues_VS1.length()
if not ischecked(FirstQues_VS1.codes(ctr), FirstQues) then
selectMulti.add(SecondQues_VS1.labels(ctr), SecondQues_VS1.codes(ctr));
endif;
enddo;
setvalueset(SecondQues, selectMulti);
Make sure the same value label in the both field. And convert the SecondQues's data capture field into Ckeckbox.
Last edited by Arjun Brti on October 5th, 2023, 11:33 pm, edited 1 time in total.