Hi,
Noticed an issue with the Add New functionality in the SharePoint Lookup control.
I am using the ‘LookupValue’ of the field via fd.field(‘LookupField’).value.LookupValue to get the string selected, however I noticed that when I use Add New feature the value returned is ‘undefined’, if I then change the value of the field it becomes the selected Lookup Value.
I have another field being set by this on a change handler which is how I realised this was happening:
fd.field('Lookup').ready().then(function(){
fd.field('Lookup').$on('change',function(){
fd.field('Other field').value = fd.field('Customer').value.LookupValue;
});
});
To get the field to be correct I have to Add New, then change the control, and then change it back to the correct value. I presume this must be a bug? This is happening on a Modern Communication site in O365.
Kind regards
Andy