Date: Thu, 1 Oct 1998 10:27:44 +0200
Reply-To: Anneke de Win <MIS@EQUINOX.NL>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Anneke de Win <MIS@EQUINOX.NL>
Subject: Re: Data Table: Multiple selection?
Hello Geir Inge,
I got pain in my eyes trying to read your message, and didn't even try to
read your scl code, to much layout rubbisch from converting.
Here are some snippets of scl code from a frame application that I use to
make multiple choices in a data table.
/* make list for multiple selections */
/* find data table id and set some attributes */
attrlist=MAKELIST(); /* default attributes */
CALL SEND (datatb,'_GET_ATTRIBUTES_',attrlist);
/* convert selection of a cell to selection of the row, allow multiple */
/* run label for obj1 after each single click on the table */
CALL SEND (datatb,'_SET_ATTRIBUTES_',attrlist);
OBJ1: /* you might consider placing this code with the label of an
object that is selected after all selections in the table
are made */
/* get list with selection lists */
CALL SEND (datatb,'_GET_SELECTIONS_',l_sel);
/* proces all selected rows */
DO range=1 TO LISTLEN(l_sel); /* DO loop for each range of rows */
/* DO loop for startrow to endrow in the range */
DO row=GETITEMN(GETITEML(GETITEML(l_sel,range),1)) TO
/* row variable now contains the number of the selected row */
CALL SEND (datatb,'_FETCH_ROW_',row);
/* add statements to do your processing */
END; /* start to end row loop */
END; /* range loop */
Multiple selections are made by holding down the control key and clicking on
the desired rows. The OBJ1 code runs after each selection, thus the
processing is done for every selected row, each team you choose another row.
Try the code and examine the l_sel list with the putlist command in the
debugger environment to see how multiple selections are stored.
Hope this helps, good luck
Anneke de Win.