Text Value of People Picker
Posted: 27 Sep 2017
I am trying to get the value of two fields and concatenate the data and post into another field.
Field 1 - Source of Lead is a Lookup field
Field 2 - Referring Employee Name is a people picker field
My code is below: -
What this code returns into the Original Source of Contact field is - Employee Referral - [object Object]
What I would like returned is - Employee Referral - Employee Name
Help appreciated please.
Thanks
Field 1 - Source of Lead is a Lookup field
Field 2 - Referring Employee Name is a people picker field
My code is below: -
Code: Select all
// Function to Set Original Source of Contact Field
function setOriginalSourceOfContactEmployeeReferral () {
var sourceOfLeadLookupText = fd.field('Source_x0020_of_x0020_Lead').control('data')['Title'];
var referringEmployeeName = fd.field('Referring_x0020_Employee_x0020_N').control('ready', function() {
var selectedUsers = fd.field('Referring_x0020_Employee_x0020_N').value();
for (var i = 0; i < selectedUsers.length; i++);
});
fd.field('Original_x0020_Source_x0020_of_x').value(sourceOfLeadLookupText + ' - ' + referringEmployeeName);
}
What I would like returned is - Employee Referral - Employee Name
Help appreciated please.
Thanks