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
jzachar
1 year agoNew Contributor
Bypass import records based off date in records (Time Dim)
How would I bypass import records where the time is not equal to the WF Time POV?
- 1 year ago
You can bypass records at the Data Source level. You would need to add a complex expression to the Time dimension of the data source. It could look something like this:
Dim WFTimeStr As String = api.CurrentDataClusterKey.TimeName Dim FileTime As String = args.Value If FileTime.XFEqualsIgnoreCase(WFTimeStr) = True Then Return args.Value Else globals.Bypass = True End IfTest and see if you can get that to work.
- 1 year ago
You could use this to get the month:
Dim thisMon As String = WFTimePOV.Split("M")(1)
T_Kress
OneStream Employee
1 year agoYou can bypass records at the Data Source level. You would need to add a complex expression to the Time dimension of the data source. It could look something like this:
Dim WFTimeStr As String = api.CurrentDataClusterKey.TimeName
Dim FileTime As String = args.Value
If FileTime.XFEqualsIgnoreCase(WFTimeStr) = True Then
Return args.Value
Else
globals.Bypass = True
End If
Test and see if you can get that to work.
jzachar
1 year agoNew Contributor
you are correct that the code pulls in the WF time POV. Unfortunately, the time in the file is year and month. I could simply check month, but I get errors trying to substring the month out of the WF Time POV (2024M1, etc). Instead of TimeName is there a way to simply pull the Month (I haven't had any luck finding it)?
- MarcusH1 year agoValued Contributor
You could use this to get the month:
Dim thisMon As String = WFTimePOV.Split("M")(1)- KarlT1 year ago
OneStream Employee
Alternatively use the TimeDimHelper which has a variety of useful and reliable ways to do this.
Dim month As Integer = TimeDimHelper.GetSubComponentsFromName(WFTimePOV).Month