I have two forms
Form 1 -
enter employee details - which has fields like employee_id_1 (number type), Designation(dropdown)
Form 2 - activity details - which has fields like employee_id_2, designation, activity details, location
Now, I want to populate designation on the basis of input for employee_id_2. I have made this employee_id_2 as a lookup field from form 1 (employee_id_1)
To fetch the records, i wrote the following script
{
temp_var= Enter_Employee_Details[employee_id_1 == input.employee_id_2];
input.Designation_2 = temp_var.Designation_1;
}
This script is not working in the scenario where the field employee_id_2 is of lookup type. However, it works fine when employee_id_2 is of type number.
What is the error here? and please suggest an alternative way if the emplpyee_id_2 is of lookup and i want to autopopulate fields from other form!