The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
JakeBrown
3 years agoNew Contributor
Data Imports
I have currently set up a new data source and associated transformation rules (and allocated to the appropriate workflow). Data importing is correctly working for 2022 time period, however I am getti...
Sai_Maganti
3 years agoContributor II
Jake
Print the sYear to error log and see what you get. Sometimes there might be a space etc. I assume you have a transformation rule for all the time periods you're loading data to. Are you able to see any data rows in the log file?
Sai
JakeBrown
3 years agoNew Contributor
Hi Sai
We are reasonably new to OneStream.... Do you have any guidance on how to print the SYear to error log?
I think this is what is causing the issue as I have just enabled multi year loads and my file (when trying to load into 2019) imported into 2022. Therefore making my think my sYear formula is defaulting to 2022 on all import years
Jake
- Sai_Maganti3 years agoContributor II
Jake
Add the following line after you declare the sYear. Then you can check what is being output in the error log.
brapi.ErrorLog.LogMessage(si, sYear)Sai
- JakeBrown3 years agoNew Contributor
Thanks Sai
Looks like it is generating 2022 (irrespective of what workflow year I am in). Any ideas?
The below is what I have to generate the year from the workflow...
Dim sYear As String = api.Parser.DelimitedParsedValues(2)
Return sYear & "M1"
- Sai_Maganti3 years agoContributor II
Jake
It is doing what you asked it to do. i.e., api.Parser.DelimitedParsedValues(2) is the Year from a row in your source data which is column 3.
If you are looking to get the Year value from the workflow then use the following code:
'Get Workflow Year Dim myWorkflowUnitPk As WorkflowUnitPk = BRApi.Workflow.General.GetWorkflowUnitPk(si) Dim wfYear As Integer = BRApi.Finance.Time.GetYearFromId(si, myWorkflowUnitPk.TimeKey) Dim sYear as String = wfYear.ToString()Sai
Related Content
- 2 months ago