02-15-2022 09:29 PM - last edited 2 weeks ago by JackLacava
I am creating an input form in CV and needs to pull IC entities which the entities are in use and have a specific name in Text 1.
When I tried to use I#ICEntities.base, I got all entities including the ones that are no longer in use.
When I tried to use I#ICEntities.base.Where((InUse = True) and (Text1 = SalesEntity)), no entity found for the query.
Please let me know how to make this work. Thanks!
02-16-2022 03:58 AM
I use a custom list to filter the ic members (by entity hierarchies, attributes and more). It looks like this in a cubeview:
I#Root.CustomMemberList(BRName=ConsolHelper, MemberListName=ICList, Dim=|WFEntityDim|, Query=[E#Group.base]):Name(|MFICDesc|)
And here is the custom list section of the related business rule (here: ConsolHelper):
Case Is = FinanceFunctionType.MemberList If args.MemberListArgs.MemberListName.XFEqualsIgnoreCase("ICList") Then Dim oMemberListHeader As New MemberListHeader(args.MemberListArgs.MemberListName) Dim sQuery As String = args.MemberListArgs.NameValuePairs("Query") 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, sQuery, Nothing) Dim oICMemberInfos As New List(Of MemberInfo) Dim test2 As MemberInfo For Each test As MemberInfo In oEntMemberInfos test2 = New MemberInfo(api.Members.GetMember(dimtype.IC.Id, test.Member.MemberId)) oICMemberInfos.Add(test2) Next Dim oMemberList As New MemberList(oMemberListHeader, oICMemberInfos) Return oMemberList End If
You can use all member filter as query, the api.Members.GetMembersUsingFilter(oEntDimPK, sQuery, Nothing) function will give you back the correct list.
In your case:
I#Root.CustomMemberList(BRName=<A Business Rule>, MemberListName=ICList, Dim=|WFEntityDim|, Query=[E#<An Entity Node>.base.Where((InUse = True) and (Text1 = SalesEntity))]):Name(|MFICDesc|)
02-16-2022 09:13 PM
Thank you so much for your help! The business rule works like a charm.
02-18-2022 12:05 PM
Great to hear it works, can you flag it as a solution? It helps other users to find it.
Cheer and have a nice week end
11-17-2022 11:44 AM
how would you amend this to work in Cubes>Data Access as a way to limit the IC partners you can post entries too?
12-25-2022 07:48 AM
I wouldn‘t, I would use the No input functionality of financial business rules.