Good day
I have an lookup field, than i put a multiple people picker in extra fields, and want to retrieve this multiple people field in my form. is it possible ?Another extra text fields works.The problem only with single\multiple Person. Set the field value:
fd.field('GroupPerson').value = fd.field('Problem').value.Grupa_x0020_de_x0020_specialisti
Dear @ixxxl,
That's because Person field is a complex field, like a Lookup field, it doesn't just store the name of the user, but also a lot of other information.
In Extra fields, use FieldName/Information you want to get, for example: Grupa_x0020_de_x0020_specialisti/Name
In Expand, use only the field name: Grupa_x0020_de_x0020_specialisti
something like we make previosly with multiple people picker
var selected = fd.field('Problem').value.Grupa_x0020_de_x0020_specialisti.Name //fd.field
var s = '';
for (var i = 0; i < selected.length; i++) {
s += selected[i].LookupValue + '; ';
}
Dear @ixxxl,
It's still a JavaScript array, so the same technique will work, simply adjust it like so:
var selected = fd.field('Problem').value.Grupa_x0020_de_x0020_specialisti;
var s = '';
for (var i = 0; i < selected.length; i++) {
s += selected[i].Name + '; ';
}
@Nikita_Kurguzov
It works, thank you ! one more thing happened , it works with users ,but when i try to insert active directory group it alert's but doesn't populate people picker. with no errors. people picker is set to multiple and with inserting groups.manual it works
Dear @ixxxl,
In this case, replace Name in Extra fields and in JavaScript code with Title: Grupa_x0020_de_x0020_specialisti/Title
var selected = fd.field('Problem').value.Grupa_x0020_de_x0020_specialisti;
var s = '';
for (var i = 0; i < selected.length; i++) {
s += selected[i].Title + '; ';
}