code for retiveing multiple lines whien boolean field is ckeck?

hi experts,

when we checked Boolean field on page

i am trying to code by which i can get mutiple sales invoice line data. i have created one action whien i click on action all sales invoice lines for which check marks are true store in text file .i know how to store in text file but not getting idea how to get those multiple lines having chech mark true. can any one know how to do that?

I would like to be more clear on this question. You mentioned the field is on-page. Does this mean it is not in the table?

Yes, it is on table i have taken it on page

After trying i got solution let me share with all

take record variable of table from which page getting data,take setrange as

recvar.setrange('boolean field ',true);

IF Recvar.FINDSET THEN
REPEAT

Outstream1.WRITETEXT(‘new line’);

UNTIL Recvar.NEXT=0;

thank you