Use ExtendedInformation Property for Database Lookups
- Last UpdatedJun 25, 2024
- 1 minute read
This scenario demonstrates the use of "ExtendedInformation" property for Database Lookups to populate the employee details.
Scenario
In this scenario, the administrator wishes to see the employee details such as Employee ID, Email, Phone, Mobile, Department and Gender on selection of the employee's name. Following is a snapshot of the employee details of the organization.

Steps to achieve the scenario
-
Create a Database lookup EmployeeDBLookup through Lookup Settings.
-
Create a Form Employee Form through Forms page which consumes the EmployeeListLookup.
The Select Employee control is a Lookup Input control through which the EmployeeDBLookup is being consumed by the form.
-
Set the On Data Changed Script property under the Advanced tab for the Select Employee Lookup Input control. Add the following script to this property.
var extendedInformation = control.extendedInformation;
if(extendedInformation !== null || extendedInformation !== undefined)
{
control.findById("T1").value = extendedInformation["EmployeeId"];
control.findById("T2").value = extendedInformation["LastName"] + " " + extendedInformation["FirstName"];
control.findById("T3").value = extendedInformation["Phone"];
control.findById("T4").value = extendedInformation["Mobile"];
control.findById("T5").value = extendedInformation["Email"];
control.findById("T6").value = extendedInformation["Department"];
control.findById("T7").value = extendedInformation["Gender"];
}
-
Click Save to save the changes to the properties. Preview the form.
-
Select the required employee from the list of employees.