Call a dynamic member list from a member formula

CarlosAlvear
Contributor

Hi all,

 

Does anyone know how to call a dynamic member list inside a member formula (well, I need it for a dynamicCalc but it can be generalized). I can call the member list in a CV with the call: 

I#ICEntities.CustomMemberList(BRName= BRName, MemberListName= MemberListName, Param1 = Param1, Param2 = Param2, Param3 = Param3)

 

In the Design and Reference (Examples of Key Functions in Use (onestream.com)), we find an example of a static member list. 

CarlosAlvear_0-1726489517980.png

Thank you for the help.

Regards

1 REPLY 1

TheJonG
Contributor II

You can reference a dynamic member list inside of the api.Members.GetMembersUsingFilter. See the example below using the member filter you referenced. You can put any member filter that works in a Cube View in the memberFilter argument of that function.

 

Dim sDim As String = args.MemberListArgs.NameValuePairs("Dim")
Dim oEntDimPK As DimPk = api.Dimensions.GetDim(sDim).DimPk
Dim oEntMemberInfos As List(Of MemberInfo) = api.Members.GetMembersUsingFilter(oEntDimPK, I#ICEntities.CustomMemberList(BRName= BRName, MemberListName= MemberListName, Param1 = Param1, Param2 = Param2, Param3 = Param3), Nothing)