Finance Rule for sorting members with Parameters in the cube view

Krishna
Valued Contributor

The below finance rule will sort the members in my case it is entity and it will take the parameters in the Cube view.

'*******************************************************************************************************************
'Parameters in the Cube View
'E#Root.CustomMemberList(BRName=MemberSort, MemberListName=AscEntSort, Memlist=E#[Legal].DescendantsInclusive)
'********************************************************************************************************************

 

 

 

 

				Dim Memberlistname As String = "AscEntSort"
				Dim MemberListstart As String = args.MemberListArgs.NameValuePairs.XFGetValue("Memlist",Nothing)

					Case Is = FinanceFunctionType.MemberList
							If args.MemberListArgs.MemberListName = Memberlistname Then
								
								Dim objMemberListHeader = New MemberListHeader(args.MemberListArgs.MemberListName)
								'members into the list
								Dim objMemberInfos As List(Of MemberInfo) = api.Members.GetMembersUsingFilter( _
											args.MemberListArgs.DimPk, MemberListstart, Nothing)

								'Sort the members with Ascending Order 
								Dim objMembers As List(Of Member) = Nothing
								If Not objMemberInfos Is Nothing Then
								objMembers = (From memberInfo In objMemberInfos _
											Order By memberInfo.Member.Name Ascending _
											Select memberInfo.Member).ToList()
								End If

								'Return
								Return New MemberList(objMemberListHeader, objMembers)
							End If

 

 

 

 

 

Thanks
Krishna
1 ACCEPTED SOLUTION

JackLacava
Honored Contributor

Hey Kris,

thanks for posting your spin on the XFR_MemberListAlphabetical rule from Golfstream. You have successfully parameterized the list that is passed in; I guess the next step would be to parameterize the sorting order 😉

View solution in original post

1 REPLY 1

JackLacava
Honored Contributor

Hey Kris,

thanks for posting your spin on the XFR_MemberListAlphabetical rule from Golfstream. You have successfully parameterized the list that is passed in; I guess the next step would be to parameterize the sorting order 😉