Member Constraints

New Contributor

Hello all . 


i am trying to display in a cubeview a list of accounts with specific constraints related to FLow , for example i want to display Only accounts with having Flow = EQU . any idea which function to use ? i tried the [Where] clause

it didnt work out. would the [Option] be helpful ? which arguments should i pass 


Contributor III


Sorry, you are on the right track... have you tried passing the argument of FlowConstraint?

Hello Nicolas, 

i tried this: A#M_BS.Base:Name(XFMemberProperty(DimType=Account, Member=|MFAccount|, Property=FlowConstraint)

it displays the flowconstraint for all BS accounts . i want to be able to select Accounts having EQU flow only . in sql it is very easy. but in OS i having difficulty finding the correct function to pass such a filter on .

It might be easier if you use an XFBR formula. Do you need the indentation in your cube view? as you will loose that by default in the XFBR!

@NicolasArgente  I am using the below formulae to fetch members in a cube view.

Account -> A#Root.CustomMemberList(BRName= abc,Param1=value1)

The results from BR defaults the indentation to 0 instead of the indentation that is mentioned in the formatting tab.

Do you know how we can change the indent level to 3 after the members get returned from BR.




Or another easy way could be to code it in a text field?

Can i find it somewhere? (BR Formula)i am still new to the OS world . no indentation is not needed . my cube will be for Data Entry purposes only

Sounds like a solution then... let me look for it!


Please try this in your cube view.

A#M_BS.Base.Where((XFMemberProperty(DimType=Account, Member=|MFAccount|, Property=FlowConstraint) = EQU)

Let us know if this works.

Nidhi Mangtani

Contributor III

You would do something like this into a Dashboard XFBR String :
   If (args.FunctionName.XFEqualsIgnoreCase("GetFlowConstraints")) Then
   ' Return Me.GetFlowConstraints(si, globals, api, args)\
And then the formula could be : 


		 Public Function GetFlowConstraints(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String
                'Get the Dim PK for Accounts Dimension
                Dim AccountsDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si,"DIMAccount")
                'Get the member name of the account
                'Get a list of BS accounts
                Dim memFilterAccounts As List(Of MemberInfo) = BRAPi.Finance.Members.GetMembersUsingFilter(si, AccountsDimPk, "A#BS.Base.Where(InUse = True)", True)
                'Use a text builder to build a string
                Dim acMemberList As New Text.Stringbuilder()
'                Dim isfirstItem As Boolean = True
                            'Loop through the assigned accounts and return the first account in the list
                            For Each account As MemberInfo In memFilterAccounts
'                                If Not isfirstItem Then
         Dim accountConstraints As String = BRApi.Finance.Account.GetConstraintMemberForDimType(si,account.Member.MemberId,dimTypeid.Flow,-1).ToString
         Dim selectedConstraint As String = args.NameValuePairs.XFGetValue("FlowTable").ToString
         If accountConstraints = selectedConstraint Then
'                                Else
'                                End If
'                             isfirstItem = False
         End If

                Return acMemberList.ToString
        Catch ex As Exception
            Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
        End Try      
 End Function


 tbh i have not tested 🙂

And you can read that too :