11-15-2022 08:31 PM - last edited on 05-02-2023 10:52 AM by JackLacava
Good Evening,
It should be something simple but apparently I am missing something. I am trying to get the Value for the Text1 field for an Account Dimension member using a Business Rule. The Text1 value vary by scenario. I trying to use ".Options()" but can get it to work. Is this the best alternative? Would you know of other alternatives? Is there a BRApi function which already does this?
Thank you for the help,
Solved! Go to Solution.
11-16-2022 09:23 AM
Did you try BRApi.Finance.Account.Text ?
for example:
'Get the member ID for the Cash account, 5 is the Account dimension dim type
Dim memberID As Integer = BRApi.Finance.Members.GetMemberId(si, 5, "Cash")
'Get the Text1 value for the default scenario type and time. The two "-1" are the defaults scenario dim type and time.
Dim acctText1 As String = BRApi.Finance.Account.Text(si, memberId, 1, -1, -1)
11-16-2022 01:42 AM
Hello, Try this please
Dim lstBaseAccounts As List(Of MemberInfo) = api.Members.GetMembersUsingFilter(api.Pov.AccountDim.DimPk, "A#[Root].DescendantsInclusive")
If lstBaseAccounts.Count > 0 Then
For Each curBaseAccount As MemberInfo In lstBaseAccounts
Dim sCurBaseAccount As String = curBaseAccount.Member.Name.ToString
Dim sText1 As String = api.Account.Text(curBaseAccount.Member.MemberId, 1)
End If
Next
11-16-2022 11:39 AM
Hi Nidhi, thank you for the help but unfortunately the code did not work.
11-16-2022 09:23 AM
Did you try BRApi.Finance.Account.Text ?
for example:
'Get the member ID for the Cash account, 5 is the Account dimension dim type
Dim memberID As Integer = BRApi.Finance.Members.GetMemberId(si, 5, "Cash")
'Get the Text1 value for the default scenario type and time. The two "-1" are the defaults scenario dim type and time.
Dim acctText1 As String = BRApi.Finance.Account.Text(si, memberId, 1, -1, -1)
11-16-2022 12:04 PM
Hi there, thank you for the help.
Yes it did work perfectly. Thank you!!