Cell Details Export via Business Rule
Hello Experts,
I am trying to export Cell Details to a CSV using a business rule function as shown below:
If args.CustomCalculateArgs.FunctionName.XFEqualsIgnoreCase("Export_CellDetails_CSV") Then
Dim wfUnitInfo As WorkflowUnitInfo = api.Workflow.GetWorkflowUnitInfo()
Dim SRCTimeName As String = wfUnitInfo.TimeName
Dim configSettings As AppServerConfigSettings = AppServerConfig.GetSettings(si)
Dim timeStamp As DateTime = DateTime.Now '.UtcNow
Dim AESTNow = System.TimeZoneInfo.ConvertTime(timeStamp, TimeZoneInfo.FindSystemTimeZoneById("AUS Eastern Standard Time"))
Dim timeString As String = AESTNow.ToString("yyyy_MM_dd_HHmm")
Dim xfolderPath As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si, True, configSettings.fileShareRootFolder, si.AppToken.AppName)
Dim csvFilePath As String = xfolderPath & "\" & "Cell_Details.csv"
If File.Exists(csvFilePath) Then
File.Delete(csvFilePath)
End If
Dim sValue As String = BRApi.Finance.Data.ExportCellDetailToCsv(si, csvFilePath, "E#T_Entities", "E#EB1000", "S#ACTUAL", "T#2022M3")
End If
I am using a "custom calc" DM step to trigger the Business Rule function. Cell details are as shown in the form.
The issue is: Cell_Details.csv file is getting generated in File Share folder but is empty (as shown below):
I have provided all the intersections (copied from Cell POV Information) in the DM step but not sure why the contents are not getting exported.
Has anybody faced this issue before? May be I am doing something silly. Thanks.
Regards,
Sid
The E# (and the S#) is only needed, if it says filter in the parameter name, I like to correct my previous statement. In the help it says:
Dim sValue As String = BRApi.Finance.Data.ExportCellDetailToCsv(si, serverFilePath, entityDimensionName, entityMemberFilter, scenarioName, timeMemberFilter)
This means, your code should be like this:
Dim sValue As String = BRApi.Finance.Data.ExportCellDetailToCsv(si, csvFilePath, "
E#T_Entities", "E#EB1000", "S#ACTUAL", "T#2022M3")=
Dim sValue As String = BRApi.Finance.Data.ExportCellDetailToCsv(si, csvFilePath, "T_Entities", "E#EB1000", "ACTUAL", "T#2022M3")
Is it working?