multi checkbox selection

Hi everybody,

well i have a small question, i created a new form wich contains a checkbox field, so for each row in my form i want that the user could check the current line , so is there a way to know after submitting the form which lines were checked.

thanks :slight_smile:

Do you want to set Checkbox to TRUE after user Submits in Form?

If yes,

You need to write code in Onpush of Submit.

Checkbox := TRUE;

MODIFY;

Actually the user could either made the check or not so in the onPush trigger i would like to get wich lines in where the checkbox is selected , i made a first try with this code but it always rendered the last checked line:

string:=’’; // text var
IF check THEN BEGIN //chek is the src expression for my checkbox field , boolean var
string+= “Operation No.”;// concatinate the string var foreach checked row in the form
MESSAGE(‘the selected rows are:’+string)
END;

Write the code like this.

Setrange(Check,true);

if findset() then

begin

repeat

string+=“OperationNo”

until next=0;

end;

Message('The selected Rows are ’ + string);

yes , but Check is a global variable , it’s not a field in the table that i can use it with setRange

First of all, your requirement is not clear…

If Check is not a table field, how and where do you mark it to TRUE and when you want to filter based on that?

Why not just train the user how to mark records? Ctrl+F1. It even puts a dot to the left of the line to indicate that it is marked. Then you can do a MARKEDONLY and get the “checked” records.

And how you do that in the RTC?

Well, there’s no marking in the RTC, but you can still filter down to groups of records you want to process.

If you really wanted to do it with the Check Box, I would say add a “Checked” boolean field to the table, then build a form using temporary records. That way the user is not directly modifying “Checked” in the table, but instead only in their view.