12-08-2021 12:23 PM
Is there a way to export a list of the members in the Accounts dimension to Excel? I'm interested in downloading:
Name
Default Description
Parent
Solved! Go to Solution.
12-08-2021 04:48 PM
By far the simplest way is to use the Grid view of your A#'s, ctrl C/V into excel, taking any of the property details you need.
12-08-2021 04:48 PM
By far the simplest way is to use the Grid view of your A#'s, ctrl C/V into excel, taking any of the property details you need.
12-09-2021 10:39 AM
You can create a csv file, it will be placed in your onestream file system user folder:
'Export File
Dim fileName As String = "CorpAccounts.csv"
Dim filePath As String = $"Documents/Users/{StringHelper.RemoveSystemCharacters(si.UserName,False,False)}"
Dim accountDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si, "CorpAccounts")
'Export CSV to User Temp Folder
Dim listOfParents As list(Of memberinfo) = BRApi.Finance.Members.GetMembersUsingFilter(si, accountDimPk, "A#[GAAP Account Structure].descendants.Where(HasChildren = true)", True)
Dim csv As New Text.StringBuilder
For Each parentMember In listOfParents
For Each childMember In BRApi.Finance.Members.GetChildren(si, accountDimPk, parentMember.Member.MemberId)
csv.AppendLine($"""{childMember.name}"",""{childMember.Description}"",""{parentMember.member.name}""")
Next
Next
Dim fileBytes As Byte() = Encoding.UTF8.GetBytes(csv.ToString)
'Save csv to file
Dim XFfileDataInfo As New XFFileInfo(FileSystemLocation.ApplicationDatabase, fileName, filePath)
Dim XFfileData As New XFFile(XFfileDataInfo, String.Empty, fileBytes)
brapi.FileSystem.InsertOrUpdateFile(si, XFfileData)
You can create a extender business rule and run in directly from the rule if you place it the unknown case or call it with a data management job if you place it in the ExecuteDataMgmtBusinessRuleStep case.
You can also place it in a dashboard extender and call it with a button control (or any other).
05-31-2022 11:21 AM
How can I view all orphaned members in OneStream. Also, does your script above export them to csv?
How can I remove them permanently ?
From Design guide:
Remove relationships:
Use this to remove the copied Member(s) from their current relationship without moving them to a
new one. If the copied Member is no longer a part of the Dimension structure, it will be placed
under Orphans.