Lookup a value from Data Source B. This is functionally equivalent to LOOKUPA except that it uses Data Source B (Target) as the connection.
It enables you to lookup values within your target data source connection, you can connect to other entities/items/tables like when you are using the connection library.
object LOOKUPB(string column, FROM(from), keyValue) object LOOKUPB(string columnName, LFROM from, params KVAL keyValues)
Below you will find a few examples of using the LOOKUPB function to lookup values via Data Source (B).
If your target was connected to Dynamics, SQL or SharePoint (to name a few) you could lookup the accountid from account where name equals the Name column using the following function:
LOOKUPB("accountid", "account", WHEN("name", Name))
For looking up in Active Directory, you can lookup the Distinguished Name of a Manager to be returned from AD for a user within the same OU.
LOOKUPB("Distinguished Name", "", WHEN("EmployeeID", ReportsTo))
To do the same as above but to lookup the manager in a different OU to the one you are currently connected to, you can add the LDAP path to the second parameter. This would look something like:
LOOKUPB("Distinguished Name", "LDAP://OU=Managers,DC=demo,DC=simego,DC=com", WHEN("Display Name", Manager))
The quoted "Distinguished Name" is the column we are looking to return from Active Directory.
We then specify the LDAP Path to the OU we want to look for the record in
Then we specify a
WHEN clause to define what the parameters are that need to be matched. This is the link between the source and the target. In this example is it the Display Name of the Manager in Active Directory to the Manager Field in the source columns.