Forum Discussion
You could achieve this if you include the Dimension Token in your WFText4. You can then check the dimension via the token e.g. UD3#Top.Base versus UD6#Top.Base, etc
You can use something like this Dictionary where the key is the DimToken and the Value is the DimTypeName, etc. My original logic had it the other way round but this works better for your use case
Public Function GetDimTokenDictionary(ByVal si As SessionInfo) As Dictionary(Of String, String)
Try
' Create object to return
Dim dimDict As New Dictionary(Of String, String)
' Retrieve all dimensions
Dim allDims As List(Of String) = DimType.GetAllDimTypes.Select(Function(dimType) dimType.Name).ToList()
' Loop allDims List
For Each dimension As String In allDims
' Handling for UD's
If dimension.StartsWith("U") Then
' Add Dimension and DimToken to dimDict for UD's
dimDict.Add(StageConstants.MasterDimensionTokens.GetDimensionToken(StageConstants.MasterDimensionNames.GetDimensionName(StageConstants.MasterDimensionNames.GetDimensionLongName(dimension.Replace("D", String.Empty)))), dimension)
Else
' Add Dimension and DimToken to dimDict for all other Dims
dimDict.Add(StageConstants.MasterDimensionTokens.GetDimensionToken(StageConstants.MasterDimensionNames.GetDimensionName(dimension)), dimension)
End If
Next dimension
' Return
Return dimDict
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
Hope this helps
Sam
- MichaelHahn2 days ago
OneStream Employee
Thank you for the reply, Sam. Where exactly is this rule logic being applied and how would this feed into a dashboard list box?
- sameburn2 days ago
OneStream Employee
You would need to use a Business Rule to achieve what you want e.g conditional logic based on your use case
You can use Dashboard DataSet or XFBR rules to feed parameters in onestream
You could then derive the dimension to use based on the dimension token e.g E# = Entity, etc in that rule based on your use case
Alternatively if you're not familiar with rules you might want to consider using a different WFText property instead to disseminate between dimension types using just substitution variables e.g |WFText4|
Hope this helps
Related Content
- 3 years ago
- 8 months ago
- 2 years ago