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).