Could somebody help me with creating SET-CALLBACK method with BEFORE-ROW-FILL callback to skip some records in DATASET temp-table ?
Regards
Andrzej
|
I'm seeking how to skip records. For example: sports database, dataset - customers and orders; how to skip orders with more then 5 orderlines ?
|
And how to reference to actual customer record field value ?
And is it necessary to precede imported record buffer with dataset handle (in CALLBACK definition and CALLBACK method) ?
DATASET dsCustomer:GET-BUFFER-HANDLE("ttOrder"):SET-CALLBACK("BEFORE-ROW-FILL", "preOrderFill").
...
METHOD PUBLIC VOID preOrderFill (INPUT DATASET dsCustomer):
customerNumber = DATASET dsCustomer:GET-BUFFER-HANDLE("ttOrder"):BUFFER-FIELD("CustNum"):BUFFER-VALUE().
IF customerNumber > 100 THEN RETURN NO-APPLY.
METHOD END.
No - as it's the BEFORE-ROW-FILL callback, the temp-table row is not yet there. That's why I wrote earlier, you access the CustNum value on the DB record, which is in scope (without any explicit find).
Thank you Mike for your assitance. My REST class works now. And by the way ... Could you give few examples of using AFTER-ROW-FILL callback. How to reference temp-table row, just ttorder ? Can I modify Dataset in that method ?
|