in another list i have a field category, linked to the source list.
Can i populate extra multiple choice field from source in to my current list in a single dropdown field?
fd.field('Dropdown').value=fd.field('Source').value.Error // extra multiple choice field
@Margo
i have 2 lists. 1st list like admin source list. 2nd list have a lookup field for list 1.
In second list on editing user must select category (from lookup of titles from list 1) and on selecting to extract from this title some multiple names and put them in single dropdown list 2.
Select in lookup - retragere numerar, and to show in single dropdown field Error(it have 5 values, in a multiple choice field)
in lookup field i put field Error in extra fields
If you need the value of the multiple choice field as a string, you can use the join() method and then populate a single choice dropdown field like this:
i tried in console to put lookup extra values, and there are old values there.
function hideOrShowProblem2() {
if (fd.field('CMSSubcategorii1').value) {
// Show the Due Date field
// $(fd.field('CMSSubcategorii1').$parent.$el).show();
$(fd.field('CMSSubcategorii2').$parent.$el).show();
fd.field('DropDown2').value = fd.field('CMSSubcategorii1').value.Error.join(' ')
fd.field('Cauza_x0020_erorii').value = fd.field('CMSSubcategorii1').value.Error.join(' ')
} else {
// Hide the Due Date field
// $(fd.field('CMSSubcategorii1').$parent.$el).hide();
$(fd.field('CMSSubcategorii2').$parent.$el).hide();
}
}
fd.spRendered(function () {
function hideOrShowProblem() {
if (fd.field('CMSCategorii').value) {
// Show the Due Date field
if (fd.field('CMSCategorii').value.LookupValue == 'Servicii la ATM') {
fd.field('CMSSubcategorii1').required = true
} else {
fd.field('CMSSubcategorii1').required = false
}
$(fd.field('CMSSubcategorii1').$parent.$el).show();
$(fd.field('CMSSubcategorii2').$parent.$el).hide();
} else {
// Hide the Due Date field
$(fd.field('CMSSubcategorii1').$parent.$el).hide();
$(fd.field('CMSSubcategorii2').$parent.$el).hide();
}
/* if (fd.field('CMSCategorii').widget.dataSource.data().length > 0) {
if (fd.field('CMSCategorii').value.LookupValue == 'Servicii la ATM') {
fd.field('CMSSubcategorii1').required = true
} else {
fd.field('CMSSubcategorii1').required = false
}
}*/
}
// Calling hideOrShowDueDate when the user changes the Start Date
fd.field('CMSCategorii').$on('change', hideOrShowProblem);
fd.field('CMSSubcategorii1').$on('change', hideOrShowProblem2);
// Calling hideOrShowDueDate on form loading
hideOrShowProblem();
hideOrShowProblem2();
});
One more in browser, and another dropdown field. shows default dropdown values.