Skip to main content
Newcomer
March 1, 2023
Solved

VLookUP Table

  • March 1, 2023
  • 1 reply
  • 0 views

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

Best answer by KarlT

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,

1 reply

KarlTOneStream EmployeeAnswer
OneStream Employee
March 1, 2023

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,

Newcomer
March 3, 2023

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

OneStream Employee
March 3, 2023

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.