SET-CALLBACK method with BEFORE-ROW-FILL example - Forum - OpenEdge General - Progress Community

SET-CALLBACK method with BEFORE-ROW-FILL example

 Forum

SET-CALLBACK method with BEFORE-ROW-FILL example

  • Could somebody help me with creating SET-CALLBACK method with BEFORE-ROW-FILL callback to skip some records in DATASET temp-table ?

    Regards

    Andrzej

  • Are you having problems with the SET-CALLBACK of the buffer? Or are you just seeking for how to skip records?
     
    For the first, please post your code and error. Methods need to be PUBLIC L
     
    For the second, it’s RETURN NO-APPLY . that skips a record.
    Von: Andrzej_Sz [mailto:bounce-Andrzej_Sz@community.progress.com]
    Gesendet: Montag, 19. September 2016 22:18
    An: TU.OE.General@community.progress.com
    Betreff: [Technical Users - OE General] SET-CALLBACK method with BEFORE-ROW-FILL example
     
    Update from Progress Community
     

    Could somebody help me with creating SET-CALLBACK method with BEFORE-ROW-FILL callback to skip some records in DATASET temp-table ?

    Regards

    Andrzej

    View online

     

    You received this notification because you subscribed to the forum.  To stop receiving updates from only this thread, go here.

    Flag this post as spam/abuse.

     

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • I'm seeking how to skip records. For example: sports database, dataset - customers and orders; how to skip orders with more then 5 orderlines ?

  • Then in the eCustomerBeforeRowFill callback (the BEFORE-ROW-FILL callback for the eCustomer buffer) count the number of orders in the DB and RETURN NO-APPLY from customers that have >= 5 orders.
    Von: Andrzej_Sz [mailto:bounce-Andrzej_Sz@community.progress.com]
    Gesendet: Dienstag, 20. September 2016 08:48
    An: TU.OE.General@community.progress.com
    Betreff: RE: [Technical Users - OE General] SET-CALLBACK method with BEFORE-ROW-FILL example
     
    Update from Progress Community
     

    I'm seeking how to skip records. For example: sports database, dataset - customers and orders; how to skip orders with more then 5 orderlines ?

    View online

     

    You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

    Flag this post as spam/abuse.

     

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • And how to reference to actual customer record field value ?

  • The DB record is accessible in the BEFORE-ROW-FILL call back.
     
    So just, Customer.CustNum.
    Von: Andrzej_Sz [mailto:bounce-Andrzej_Sz@community.progress.com]
    Gesendet: Dienstag, 20. September 2016 09:38
    An: TU.OE.General@community.progress.com
    Betreff: RE: [Technical Users - OE General] SET-CALLBACK method with BEFORE-ROW-FILL example
     
    Update from Progress Community
     

    And how to reference to actual customer record field value ?

    View online

     

    You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

    Flag this post as spam/abuse.

     

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • 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).

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • 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 ?

  • The Temp-Table record will just still be available in the AFTER-ROW-FILL. Just like the DB-Record is just available in the BEFORE-ROW-FILL.
    Von: Andrzej_Sz [mailto:bounce-Andrzej_Sz@community.progress.com]
    Gesendet: Mittwoch, 21. September 2016 14:16
    An: TU.OE.General@community.progress.com
    Betreff: RE: [Technical Users - OE General] SET-CALLBACK method with BEFORE-ROW-FILL example
     
    Update from Progress Community
     

    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 ?

    View online

     

    You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

    Flag this post as spam/abuse.

     

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.