How how can I get the value from a people picker control?
if (colListItem.get_item(User).length > 1) {
for (var i = 0; i < colListItem.get_item(User).length; i++)
{
//Append all User names with a semi colon separator
_User = _User + colListItem.get_item(User)[i].get_lookupValue() + ";";
}
_User.trim;
}
}
}
This works if there is more than one value in the people picker control. But if there is only one value, I am unable to retrieve it.
Change it from:
To:
If there is only one value, only the second one will be true.