Skip to main content
May 17, 2024
Solved

Dynamic column for different entities

  • May 17, 2024
  • 1 reply
  • 0 views
How to create a form with dynamic cost buckets (columns) that change every year for different entities in OneStream ?
    Best answer by Kamila

    I hope it helps:

    If args.FunctionName.XFEqualsIgnoreCase("DynamicColumns") Then
    Dim sEntity As String = args.NameValuePairs("Entity") 'thats the entity from cube view
    'if you won't take entity from cube view, just can take it from workflow 
    Select Case sEntity 
    Case Entity_1
    Return "S#Scenario_1, S#Scenario_2" 'or whatever you want
    Case Entity_2
    Return "S#Scenario_5"
    End Select
    End If

     

    1 reply

    May 17, 2024

    To make columns dynamic, you can use parameter or XFBR String.

    In parameter you can use method type - Business Rule and there define the logic according to entity from workflow.

    You can also use XFBR - XFBR(Business Rule name, name of Method, another parameters) like XFBR(MyBusinessRule, MyMethod, Entity = |MFEntity|) in column and of course write a Dashboard XFBR String business rule.

    100RubAuthor
    May 17, 2024

    Hi Kamila,

    Thank you for your solution. I would appreciate it if you could please draft a snippet for Dashboard XFBR String business rule, as I am not well-versed in writing code. 

    Kind Regards

    KamilaAnswer
    May 17, 2024

    I hope it helps:

    If args.FunctionName.XFEqualsIgnoreCase("DynamicColumns") Then
    Dim sEntity As String = args.NameValuePairs("Entity") 'thats the entity from cube view
    'if you won't take entity from cube view, just can take it from workflow 
    Select Case sEntity 
    Case Entity_1
    Return "S#Scenario_1, S#Scenario_2" 'or whatever you want
    Case Entity_2
    Return "S#Scenario_5"
    End Select
    End If