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
mariavalenv19
3 years agoNew Contributor II
VLookUP Table
Hi,
I'm trying to look up values from a VLookUp table (previously made in the Transformation Rules) within a Complex Rule in my Data Source, MMomentoff how could I this? Thank you very much in advanced.
Best,
Nieves
Hi,
You can use the function:
BRApi.Utilities.TransformText(si, "LookupItem", "LookupGroupName", Boolean)
where "lookupitem" is the item you wish to look up and the "lookupgroupname" is the name of the name of the lookup transformation group. the boolean determines how to handle in the event the lookup item is not found. (see the intellisense information in OS)
If you will need to look up the same item repeatedly, you may want to consider using the global objects to store the results of previous lookups to avoid repeated calls of the BRAPI.
Regards,
5 Replies
- KarlT
OneStream Employee
Hi,
You can use the function:
BRApi.Utilities.TransformText(si, "LookupItem", "LookupGroupName", Boolean)
where "lookupitem" is the item you wish to look up and the "lookupgroupname" is the name of the name of the lookup transformation group. the boolean determines how to handle in the event the lookup item is not found. (see the intellisense information in OS)
If you will need to look up the same item repeatedly, you may want to consider using the global objects to store the results of previous lookups to avoid repeated calls of the BRAPI.
Regards,
- mariavalenv19New Contributor II
Hi Karl,
This worked perfectly, now we're trying to figure out how to make an error message pop when there is no value in the table. Thank you very much!
Best Regards,
Nieves
- KarlT
OneStream Employee
Hi Nieves, Rather than throw an error I would try an "import>Workspace" type workflow so you can review the "untransformed" items after import and maybe prevent workspace completion if this list isn't empty.
Related Content
- 2 months ago