Forum Discussion

Oscar's avatar
Oscar
Contributor
1 day ago

Derivative Rule

Alo

I’m trying to create a Source Derivative Rule that takes each inbound Stage row and produces **two** output rows. The first row should remain completely unchanged. The second row should be an exact duplicate of the first, except the **FERC** field must be replaced with the value from **A8**. I’ve confirmed that Rule Expressions cannot duplicate rows, and the `Transformer` object in Source Derivative Rules does not expose methods like `GetInputRow` or `GetSourceRecord`. I’m looking for the correct, supported API pattern for duplicating a Stage row inside a Source Derivative Rule, or confirmation that this must be done in a different rule type (e.g., Target Derivative Rule).

Any examples would be greatly appreciated

2 Replies

  • T_Kress's avatar
    T_Kress
    Icon for OneStream Employee rankOneStream Employee

    I believe you can use the multiply by 1 to create a duplicate record.  It would be something like this:

     

    • Oscar's avatar
      Oscar
      Contributor

      Hi ! Thank you for your response!

      The duplicated record is accomplished by simply referencing the attribute that holds the dimension member (Location for example) A8#[*]

      Now we are trying to copy the value of attribute A8 into the U2# dimension field for the duplicated line but we have not been able to identify the correct logical expression.

      We have tried:

      • A8#[*]:U2#[*]=A8#[*]
      • A8#[*]:U2#[*]<<A8#[*]