MichaelHahn
OneStream Employee
3 months agoHow to populate a Dashboard List Box referencing WFText4 but the UD dim may vary across Workflows?
As the title suggests, I am trying to populate a dashboard list box that references the Workflow text property regardless of the dimension being used. I'm able to populate the list box using a single...
- 3 months ago
Hi MichaelHahn
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 FunctionHope this helps
Sam