Skip to main content
Newcomer
Feb 16, 2022 2:29 AM UTC

How do I filter I#IC Entities in CV?

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

ChristianW
Employee - Advisor
Employee - Advisor
Feb 16, 2022 8:58 AM UTC

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.

AuroraAuthor
Newcomer
Feb 17, 2022 2:13 AM UTC

Hi Christian,

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

Aurora

 

ChristianW
Employee - Advisor
Employee - Advisor
Feb 18, 2022 5:05 PM UTC

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

Newcomer
Nov 17, 2022 4:44 PM UTC

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

 

ChristianW
Employee - Advisor
Employee - Advisor
Dec 25, 2022 12:48 PM UTC

Hi Tommyreebok

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

cheers

christian

Member
Sep 27, 2023 9:04 AM UTC

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