Update another field with Lookup field value

Hello,

I have a field called 'Item' that is a SharePoint lookup drop down value. When a value from 'Item' is selected, I would like to auto populate another field ('Title') with its value. It seems that because 'Item' is a Lookup field, the normal JS I would use isn't working.

Can anyone help?

Current code:

spRendered(function() {

 fd.field('Item').$on('change', function () {
            fd.field('Title').value = fd.field('Item').value;
 });

});

Hello @ParAvion,

Yes, the code for lookup fields is slightly different. For instance, if you need to get the display value of the lookup field you need to use this code:

// returns the selected element as a string:
fd.field('Item').value.LookupValue;

You can find more information about JS code for different field types in the documentation here.