Using the value of a lookup in another field

Hello,

I'd like to use the value from a lookup field (AssetTested) and pass it through to the Title field, however, when I do this I get [object Object] as the value, rather than the ID / Name.

Here's my javascript for it, can someone advise what I've done wrong, please?

fd.spRendered(function(){

  function setTitleValue() {
        fd.field('AssetTested').value;
    }

// Calling setTitleValue when value changes
fd.field('AssetTested').$on('change',setTitleValue);
fd.field('TestStatus').$on('change',setTitleValue);
// Calling setTitleValue on form loading
setTitleValue();

});

Hello @Dayna,

The Lookup field value is stored as an object. If you want to get the display value of the Lookup field. use this coe:

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

Please learn more about JavaScript Framework of Lookup field in our documentation.