Forum Discussion
ChrisR1ch
1 year agoNew Contributor III
Member Filter on Scenario properties
I would like to apply a member filter on a scenario, which will return a list of a scenarios based on it's properties like Name, Description, WorkflowTime, WorkflowStartTime, and WorkflowEndTime...i....
- 1 year ago
Just thought I would add what I did to resolve this issue.
I created a parameter, of type Member List
I set the Display Items and Value Items (comma delimited) as a call to an XBFR rule: XFBR(XFBR_Member_List, SP_Source_Scenario_List,PoVTime=|WFTime|)
I set my Combo Box, Bound Parameter to the previously created parameterIn my XFBR rule I return the list like this...
Dim POVWorkflowTime As String = args.NameValuePairs.XFGetValue("PoVTime") Dim memberFilter As String = "S#SpendPlanControl.Base.Where(Name DoesNotContain Working)" Dim ScenarioLists As List (Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, "S_BudEx", memberFilter, True) Dim memberString As String = String.Empty For Each scenarioMbr In ScenarioLists Dim ScenarioMember As MemberInfo = BRApi.Finance.Metadata.GetMember(si, DimType.Scenario.Id, scenarioMbr.Member.Name, True) Dim ScenarioMemberID As Integer = ScenarioMember.Member.MemberId 'Get Scenario member property WorkflowTime for comparison Dim scenarioListWorkflowTime As String = ScenarioMember.GetScenarioProperties.WorkflowTime.GetStoredValue.ToString.Substring(0, 4) Dim scenarioListWorkflowStartTime As String = ScenarioMember.GetScenarioProperties.WorkflowStartTime.GetStoredValue.ToString.Substring(0, 4) Dim scenarioListWorkflowEndTime As String = ScenarioMember.GetScenarioProperties.WorkflowEndTime.GetStoredValue.ToString.Substring(0, 4) 'Compare Scenario List Workflow time to POV Workflow Time If scenarioListWorkflowTime = POVWorkflowTime Then memberString = memberString & scenarioMbr.Member.Name & "," End If Next Return memberString
chul
OneStream Employee
1 year agoYou can use the text fields on the scenario. Granted, it's redundant but it will allow you to use the where clauses. If you didn't want an admin to have to remember to add the text fields when new scenarios are created, you could write a BR to add them and schedule it so the admin wouldn't need to remember to run it.
- ChrisR1ch1 year agoNew Contributor III
Just thought I would add what I did to resolve this issue.
I created a parameter, of type Member List
I set the Display Items and Value Items (comma delimited) as a call to an XBFR rule: XFBR(XFBR_Member_List, SP_Source_Scenario_List,PoVTime=|WFTime|)
I set my Combo Box, Bound Parameter to the previously created parameterIn my XFBR rule I return the list like this...
Dim POVWorkflowTime As String = args.NameValuePairs.XFGetValue("PoVTime") Dim memberFilter As String = "S#SpendPlanControl.Base.Where(Name DoesNotContain Working)" Dim ScenarioLists As List (Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, "S_BudEx", memberFilter, True) Dim memberString As String = String.Empty For Each scenarioMbr In ScenarioLists Dim ScenarioMember As MemberInfo = BRApi.Finance.Metadata.GetMember(si, DimType.Scenario.Id, scenarioMbr.Member.Name, True) Dim ScenarioMemberID As Integer = ScenarioMember.Member.MemberId 'Get Scenario member property WorkflowTime for comparison Dim scenarioListWorkflowTime As String = ScenarioMember.GetScenarioProperties.WorkflowTime.GetStoredValue.ToString.Substring(0, 4) Dim scenarioListWorkflowStartTime As String = ScenarioMember.GetScenarioProperties.WorkflowStartTime.GetStoredValue.ToString.Substring(0, 4) Dim scenarioListWorkflowEndTime As String = ScenarioMember.GetScenarioProperties.WorkflowEndTime.GetStoredValue.ToString.Substring(0, 4) 'Compare Scenario List Workflow time to POV Workflow Time If scenarioListWorkflowTime = POVWorkflowTime Then memberString = memberString & scenarioMbr.Member.Name & "," End If Next Return memberString
Related Content
- 2 years ago
- 8 months ago
- 2 years ago