LOOKUPB
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.
Syntax
object LOOKUPB(string column, FROM(from), keyValue)
object LOOKUPB(string columnName, LFROM from, params KVAL[] keyValues)
Example
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.
DS- columns are Data Sync attribute columns that handle the addition of that field for each user. These usually have to be handled differently to add the values, which in previous versions would have needed you to write code. These columns take away the need to add code to project automation.
The DS-DN column is a Data Sync generated column that returns the distinguished name.
LOOKUPB("DS-DN", "", 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("DS-DN", "LDAP://DC01/OU=Managers,DC=demo,DC=simego,DC=com", WHEN("DisplayName", Manager))
The "DS-DN" is the column we are looking to return from Active Directory. This is the distinguished name of the manager.
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 DislayName of the Manager in Active Directory to the Manager Field in the source columns.