hcl-bot
February 26, 2007, 11:34am
1
I can’t seem to figure out how to pull in two fields into a form using a picklist. I want the user to be able to click on the Employee Name field and select the employee from the employee view. I want that to pull in the employee name as well as the employee number off that view into the new form.
Would on of you mind posting some example code?
hcl-bot
February 26, 2007, 12:00pm
2
Subject: Picklists
I just finished doing this.
Create a hidden column at the end of your view and concatenate the name~number.
Then in your picklist, return that column number. Then use left & right to split it back up.
NewName := @PickList ([Custom]:[Single]; @DbName ; “(EmployeeName)”; “Select an employee”; “Please select the employee you want to change to”; 3);
@If ( NewName != “”; FIELD EmpName:= @Right (NewName; “~”);“”);
@If ( NewName!= “”; FIELD EmpID := @Left (NewName; “~”); “”);
Subject: Picklists
I just finished doing this.
Create a hidden column at the end of your view and concatenate the name~number.
Then in your picklist, return that column number. Then use left & right to split it back up.
NewName := @PickList ([Custom]:[Single]; @DbName ; “(EmployeeName)”; “Select an employee”; “Please select the employee you want to change to”; 3);
@If ( NewName != “”; FIELD EmpName:= @Right (NewName; “~”);“”);
@If ( NewName!= “”; FIELD EmpID := @Left (NewName; “~”); “”);