SPFieldLookupMulti

Home Forums vLooup for SharePoint SPFieldLookupMulti

Viewing 1 reply thread
  • Author
    Posts
    • #6691
      David S Kaimann
      Participant

        Alexander,

        On the prior version’s forums / comments, another user suggested adding the block of script in bold below to allow the selection of a “Multiple Lookup” field when using the “Add New Item” feature in vLookup. I was able to confirm that it still works in the non-minified version of vLookup. Any chance you’d consider adding this to vLookup and future minified versions?

        Thanks!!!

        case ‘SPFieldLookup_Input’:
        inputField = thisField.find(‘input.ms-lookuptypeintextbox’);
        inputFieldHidden = $(“*[id='”+inputField.attr(‘optHid’)+”‘]”);
        split = inputField.attr(‘choices’).split(‘|’);
        // Try setting text first
        $.each(split,function(i,val){
        if(i%2!==0){
        return;
        }
        if(val===lVal){
        inputField.val(split[i]);
        inputFieldHidden.val(split[i+1]);
        return false;
        }
        });
        // If value is not set – try with ID
        if(getFieldValue(fin) !== lVal){
        $.each(split,function(i,val){
        if(i%2===0){
        return;
        }
        if(val===lId){
        inputField.val(split[i-1]);
        inputFieldHidden.val(split[i]);
        return false;
        }
        });
        }
        break;
        case ‘SPFieldLookupMulti’:
        thisField.find(‘select’).val(lId);
        thisField.find(‘select option[value=”‘+lId+'”]’).trigger(“dblclick”);
        break;

      • #8676
        Gerard Graham
        Participant

          Hi there

          I was looking to do the same thing, pre populate a Multi look up field. The item is selected but not added.

          Is this something that can be done?

          Regards

          Gerry

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.