The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.

Forum Discussion

OSAdmin's avatar
OSAdmin
Icon for OneStream Employee rankOneStream Employee
6 years ago

Has anyone written custom translation rules?

Originally posted by Eric Osmanski

8/1/2018

Has anyone written custom translation rules where they can send me some samples?

1 Reply

  • OSAdmin's avatar
    OSAdmin
    Icon for OneStream Employee rankOneStream Employee
    Originally posted by Chul Smith

    "Dim strFlowType As Boolean = api.flow.switchType(api.Pov.flow.memberid)
    Then for the asset/liability sections, replace the three lines with this condition that takes into account switch type.
    If strFlowType Then
    strRateType = ""AverageRate""
    Dim rate As Decimal = api.FxRates.GetCalculatedFxRate(strRateType, curTimeID, args.FxRateArgs.SourceCurrencyId,args.FxRateArgs.DestCurrencyId)
    Return New FxRateResult(rate)
    Else
    strRateType = ""ClosingRate""
    Dim rate As Decimal = api.FxRates.GetCalculatedFxRate(strRateType, curTimeID, args.FxRateArgs.SourceCurrencyId,args.FxRateArgs.DestCurrencyId)
    Return New FxRateResult(rate)
    End If"