Dynamically update Lookup Column

Dear phil,

Yes, it’s possible, though you should retrieve lookup options with JS, then go through them, find a match, and set it with a matching item ID.

A code will be like this:

fd.field("Lookup").ready().then(function(field){    
    field.widget.bind("dataBound", function() {
        var lookups = field.widget.dataSource.data();
        for (i = 0; i < lookups.length; i++) {
            if (lookups[i].LookupValue == "Your text value") {
                field.value = lookups[i].LookupId;
                break;
            }
        }
    })  
}) 

Notice that you should replace “Your text value” with your text value, “Lookup” with the internal name of your lookup field and place this code snippet into the spRendered() event handler.