Skip to main content
Newcomer
Mar 1, 2023 4:09 PM UTC
Solved

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

KarlTAnswer
Employee - Guide
Mar 1, 2023 7:17 PM UTC

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

KarlTEmployee - GuideAnswer
Employee - Guide
Mar 1, 2023 7:17 PM UTC

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
Mar 3, 2023 1:02 PM UTC

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

Employee - Guide
Mar 3, 2023 4:07 PM UTC

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.