How do I filter I#IC Entities in CV?

Aurora
New Contributor

Hi Everyone,

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!

6 REPLIES 6

ChristianW
Valued Contributor

Hi Aurora

I use a custom list to filter the ic members (by entity hierarchies, attributes and more). It looks like this in a cubeview:

ChristianW_0-1645000895347.png

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|)

should work.

Hi Christian,

Thank you so much for your help!  The business rule works like a charm. 

Aurora

 

ChristianW
Valued Contributor

Hi Aurora

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

Tommyreebok
New Contributor II

how would you amend this to work in Cubes>Data Access as a way to limit the IC partners you can post entries too?

 

Hi Tommyreebok

I wouldn‘t, I would use the No input functionality of financial business rules.

cheers

christian

Catherine_Tee
New Contributor III

How do I filter I#IC Entities exclude Entities Text 5 = Equity in CV?