Hi,
I am trying to make a PagePart in my Page - but it will not make the Filter that I would like.
I have in the Classic Client som code that makes a Filter by calling a Function og the Subform - which I am trying to doublicate to my Page - but it doesn't work. :oops:
The Code:
Can anyone help me?
/Allan
0
Comments
And: have you tried CurrPage.Update; after calling the function?
The Function:
SetActSubscriber(pNo : Code[20])
ActSubscriberNo := pNo;
SETRANGE("Subscriber No.", ActSubscriberNo);
Have tried to call CurrPage.Update - got an error saying something like:
"You can not make a change to the databasen before a transaction has started"
No effect.
Have inserted some Messages - and I can se that the code on the function is processed - but doesn't take effect, or at least doesn't update the subpage...
[edit]
oops, if the user wants to change this filter he won't like this :oops:
In this case a check is needed whether the filter has to be set or not, something like
SetActSubscriber(pNo : Code[20])
ActSubscriberNo := pNo;
FilterHasBeenSet := FALSE;
OnAfterGetRecord()
IF NOT FilterHasBeenSet THEN SETRANGE("Subscriber No.", ActSubscriberNo);
FilterHasBeenSet := TRUE;
[/edit]
And what about SubFormLink / SubPageLink?
Regards
The solution was simple: change the pagetype from the main page to worksheet.
:-$ I should have known, made worksheets before....but the filtering was done with an action and not with a field with options in the main page. :-$