hi I’m having this problem. Please help me!!!
I have a form and a subform. I need to get all the record marked in the subform.
I’ve created a function in my subform called MyFuncion:
MyFunction()
MyRec.COPY(Rec);
CurrForm.SETSELECTIONFILTER(MyRec);
In the main form i have a button that OnPush() call MyFunction: “CurrForm.abc.FORM.MyFunction()”;
I can’t get my marked records in the main form.
Thank u all
kriki
July 31, 2007, 1:46pm
2
Best is to create a parameter in the function that is a temptable. In the function, you fill up the temptable with the marked records. In the mainform, you can then read the temptable.
Thank you.
But how can i read the temp table in my main form?
Sorry, i’m just geting started with c/al.
kriki
July 31, 2007, 2:27pm
4
Main form:
-define a global record “tmpTempTable” with property Temptable=Yes
CurrForm.abc.FORM.MyFunction(tmpTempTable);
tmpTempTable.RESET;
IF tmpTempTable.FINDSET THEN
REPEAT
MESSAGE(‘Some Field:%1’,tmpTempTable.“Some Field”);
UNTIL tmpTempTable.NEXT = 0;
-in the subform:
MyFunction(VAR PtmpTempTable as record [with property TempTable=Yes])
PtmpTempTable.RESET;
PtmpTempTable.DELETEALL(FALSE);
MyRec.COPY(Rec);
CurrForm.SETSELECTIONFILTER(MyRec);
IF MyRec.FINDSET THEN
REPEAT
PtmpTempTable := MyRec;
PtmpTempTable.INSERT(FALSE);
UNTIL MyRec.NEXT = 0;
I think it’s almost done…
The program gives me the selected ones instead of the marked…
Is it possible to get the Marked Records?
dans
August 1, 2007, 1:46am
6
SETSELECTIONFILTER is used to get the selected records. To get the marked one, use MARKEDONLY.
Thank you all. My problem is solved.