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
RobbSalzmann
3 years agoValued Contributor II
Unable to get value from another column in Parser BR
OneStream V7.0.1 We have a Data Source that takes data file that has 12 data columns Oct ... Sep. The year for the data in the 12 data columns is a field "Fiscal Year", the first column of the data...
- 3 years ago
This approach should work
- add a new Source Dimension for Time of type "Matrix DataKey Text".
- change that data type to "DataKey Text" and assign it to the Fiscal Year column
- modify the rule above to just return M1, M2, etc.
The result should automatically concatenate year and period for the exploded records.
- 3 years ago
This and the following code in a BR called by each of the month columns solved for this requirement. Thanks JackLacava ckattookaran and franciscoamores for all the considerations.
RobbSalzmann
3 years agoValued Contributor II
Francisco! ๐
We thought about using an attribute also, but are unable to figure out which object the attribute is hiding in in the BR, or if the BR even has access to it. Maybe you will find it in your testing.
Back in the days of Upstream, the record being operated on was one of the arguments of the parsing/transformation function. Its odd how that design didn't follow here. It made things very easy having the entire record available while parsing, as it's common to apply logic using the contents of multiple columns.
JackLacava
OneStream Employee
3 years agoIt does work like that, just not with Matrix loads.
- RobbSalzmann3 years agoValued Contributor II
JackLacava any suggestion on how to get a value from another column in a matrix rule?
- franciscoamores3 years agoContributor II
Line being processed is in args.Line. You can also use api functions to read data source setup in case that's needed.
Let's do something, can you reproduce this for GolfStream app so I can have a look there.
You will have to attach or send data source a sample file ๐
- JackLacava3 years ago
OneStream Employee
He's working with a Matrix, those won't populate args.Line in the same way. It shouldn't be a problem, because values can be automatically concatenated like I mentioned above.
- JackLacava3 years ago
OneStream Employee
Did you try this? https://community.onestreamsoftware.com/t5/Workflow-and-Data-Integration/Unable-to-get-value-from-another-column-in-Parser-BR/m-p/19099/highlight/true#M1340
As long as you put that extra Time field before all the other ones in the sequence, it will work (tested in 7.4).
Beyond that, you can set a rule on the Amount field; that will run for all values, with a populated line in args.Line.
Related Content
- 5 months ago
- 2 years ago