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

OSAdmin's avatar
OSAdmin
Icon for OneStream Employee rankOneStream Employee
6 years ago

Does anyone have a Parse Rule or another method of getting just the current month to import.

Originally posted by Craig Masters

12/3/2018

Data Source Parser Question: Client's data file contains 12 columns for the months no matter when it is run for the year. If it's January, it will have 12 columns showing Jan - Dec. Does anyone have a Parse Rule or another method of getting just the current month to import. 

 

1 Reply

  • OSAdmin's avatar
    OSAdmin
    Icon for OneStream Employee rankOneStream Employee
    Originally posted by Joakim Kulan

    I managed to optimize the code:

    Dim povPeriod As String = TimeDimHelper.GetNameFromId(api.WorkflowUnitPk.TimeKey)
    Dim colNo As Integer = povPeriod.Split(""M"")(1).XFConvertToInt + 3

    Return api.Parser.DelimitedParsedValues(colNo)