Skip to main content
Newcomer
May 17, 2023 12:56 AM UTC
Solved

Usage of DataBuffer1, DataBuffer2

Hi Experts,

When do we exactly use DataBuffer1, DataBuffer2 in rules. while we have databuffer in api.

much appreciate if one example can be provided atleast

    Employee - Sage
    May 17, 2023 11:25 PM UTC

    They are available only in an Eval sub. Eval effectively stops execution of the Calculate formula, and hands control to the specified sub; when it happens, the buffer resulting from previous execution steps is exposed in eventArgs.DataBuffer1, to be eventually replaced by what you'll store in eventArgs.DataBufferResult.

    Search documentation for Eval, there are examples and Snippets.

    3 replies

    Employee - Sage
    May 17, 2023 11:44 AM UTC

    Are you referring to eventArgs.DataBuffer1 ?

    BCGAuthor
    Newcomer
    May 17, 2023 4:49 PM UTC

    yea JackLacva

    Employee - Sage
    May 17, 2023 11:25 PM UTC

    They are available only in an Eval sub. Eval effectively stops execution of the Calculate formula, and hands control to the specified sub; when it happens, the buffer resulting from previous execution steps is exposed in eventArgs.DataBuffer1, to be eventually replaced by what you'll store in eventArgs.DataBufferResult.

    Search documentation for Eval, there are examples and Snippets.