01-09-2024 03:52 AM
Dear all,
I'd like to know how do you define a particular text for an IC member. I thought that once you define a text for an entity having a IsIC = True will transfer that information automatically to the same member in the IC dimension but it seems that it doesn't work that way. Given this, how would you set up the text for IC members?
Thank you. Best regards,
Carlos
Solved! Go to Solution.
01-10-2024 07:15 AM - edited 01-10-2024 07:16 AM
My bad, I got confused with something else.
I think this warrants a quick member list. Amend values of dimensionName and entityFilter as necessary:
' in a Finance BR
Case Is = FinanceFunctionType.MemberList
If args.MemberListArgs.MemberListName.XFEqualsIgnoreCase("withText1") Then
Dim dimensionName as String = "CorpEntities"
Dim entityFilter as String = "E#Root.Base.Where(Text1 <> '')"
Dim ICs As New List(Of Member)
Dim entities As List(Of MemberInfo) = brapi.Finance.Members.GetMembersUsingFilter(si, _
brapi.Finance.Dim.GetDimPk(si, dimensionName), _
entityFilter, _
True)
For Each entityMInfo As MemberInfo In entities
ICs.Add(brapi.Finance.Members.GetMember(si, dimtypeId.IC, entityMInfo.Member.Name))
Next
Return New MemberList(New MemberListHeader("withText1"), ICs)
01-09-2024 09:13 AM
CarlosALVEAR,
The IC dimension does not have any member attributes. You will need to get the Text Value from the IC Entity that is being referenced.
01-09-2024 09:47 AM
Hi Steven,
The original need is to use a MF for IC, for instance "I#ICEntities.Children.Where(Text2 Contains XXX)".
Thank you!
01-09-2024 10:18 AM
Should be doable by referencing entities. Not tested but this should work: I#ICEntities.List(E#YourRoot.Children.Where(Text2 Contains XXX))
01-09-2024 10:54 AM
Hi Jack,
Thank you for your idea. I tried something simpler without success [I#ICEntities.List(E#YourRoot.Children)]. It's the first time I see that it's possible to select a member from another dimension. Should it work?
Thank you. Best regards
01-10-2024 07:15 AM - edited 01-10-2024 07:16 AM
My bad, I got confused with something else.
I think this warrants a quick member list. Amend values of dimensionName and entityFilter as necessary:
' in a Finance BR
Case Is = FinanceFunctionType.MemberList
If args.MemberListArgs.MemberListName.XFEqualsIgnoreCase("withText1") Then
Dim dimensionName as String = "CorpEntities"
Dim entityFilter as String = "E#Root.Base.Where(Text1 <> '')"
Dim ICs As New List(Of Member)
Dim entities As List(Of MemberInfo) = brapi.Finance.Members.GetMembersUsingFilter(si, _
brapi.Finance.Dim.GetDimPk(si, dimensionName), _
entityFilter, _
True)
For Each entityMInfo As MemberInfo In entities
ICs.Add(brapi.Finance.Members.GetMember(si, dimtypeId.IC, entityMInfo.Member.Name))
Next
Return New MemberList(New MemberListHeader("withText1"), ICs)
01-10-2024 09:17 AM
Hi Jack,
Thank you for your reply. In a general case, that would be enough but I'm trying to apply it to a MF using "Insert Member Filter" + "Suppress Nodata Rows = True" so a member list would not work either.
I'd like to use the "I#ICEntities.Children.Where( ...) " condition for IC dimension.
Thank you