Extensible document business rule

EPM_22
New Contributor II

Hi 

I create OneStream parameters for the fields that I want to bring in from OneStream into an extensible document in order not to mess up the formatting of the document as the formula is very long to pull the data into OneStream. 

Now I want to create a parameter that uses a business rule to check if the amounts for one line of the two year's  income statement (This year and last year) lines are both positive, then put "Profit" in the text of the account or "Profit/Loss" if the one amount is positive and the other is negative or "Loss" if both amounts are negative.  

How do i do that ? 

 

 

4 REPLIES 4

Steven
Contributor

EPM_22 You should be able to create an XFBRString to compare the values of the two cells.

EPM_22
New Contributor II

Hi there Steven.   I am not able to get it right .  Should I write it in a business rule to compare the values of two parameters ? 

 

JackLacava
Community Manager
Community Manager

This sounds like the sort of thing that is better suited to a Dynamic Calc formula, strategically placed on a UD8 member, reacting to an Annotation-type View member. You then just reference the intersection in a regular Extensible Document field.

Very rough example:

If api.View.IsAnnotationType() Then
    Dim diff as Decimal = api.Data.GetDataCell("T#2024 - T#2023").CellAmount
    If diff > 0 then
      return "Profit"
    else
      return "Loss"
    End If
End If
Return Nothing

Extensible Documents are not meant for calculations; they are meant to embed data that has already been calculated by the engine.

EPM_22
New Contributor II

Hi Jack. It is used in an extensible document so will a dynamic calc work ?