Hi everyone,
I have a form for which I want to skip certain records.
In the OnAfterGetRecord trigger, there is a code that calculates a decimal varaiable X.
I want to be able to display only the records for which X > 0.
How can I achieve that?
Thanks in advance
Comments
it is possible, but not really easy. I have such code in my chart of accounts to select the accounts which are to be displayed (those marked and those that have entries in selected accounting periods). Basically you need to implement your own OnFindrecord/OnNextRecord functions. There are some catches in the logic to do so:
1. Clipping: When you reach the first or the last record of your (filtered) table, these might not be valid entries (X<=0). You have to go backwards until you find a valid record.
2. Steps: OnNextRecord can jump in steps <> 1 or -1. To fulfill the request you have to examine every record in the desired direction and only count the valid ones as a step.
With this it should work.
As an example, the copy/paste source from my chart of accounts form:
with best regards
Jens