Multivalue

Home Forums Autocomplete Multivalue

Viewing 6 reply threads
  • Author
    Posts
    • #12024
      Michal Riha
      Participant

        Hi Alexander,

        do you will extend your autocomplete solution to support multivalue? Something like this: https://jqueryui.com/resources/demos/autocomplete/multiple.html

        Thanks

        Michal

      • #12081
        Alexander Bautz
        Keymaster

          Hi,
          This should be possible to add support for. I have to wrap up a few other things first, but might be able to look into it this weekend.

          Do you have any specific requirements for how it should work?

          My initial thoughts are that the “setFields” option (for setting additional fields from the lookup) cannot be used when it is in “multiselect mode”.

          Alexander

        • #12350
          Michal Riha
          Participant

            Hi Alexander,

            after one week testing – multiselect works perfect.

            We are encountered only one issue: When prefill autocomplete field (we use copy from parent (vlookup) to child item) – it is prefilled as item1; item2; item3 and it is not possible to work with this field – not possible to add new keyword because of “item1; item2; item3” – no items match your search…
            Is it possible to run some javascript “refresh” this prefilled autocomplete field – to avoid the need to select every keyword from “dropdown”?

            Michal

          • #12352
            Michal Riha
            Participant

              Adds to the previous post:

              behaviour of prefilled fields depends on the field type and if vLookup new child is opened to popup or not.

              See attachement:
              Autocomplete multivalue field – opened to popup: OK
              Autocomplete multivalue field – opened to same window: NOK (not recognized as keywords)
              User or Group field – opened to popup: NOK (multiple entried matched..)
              User or Group field – opened to same window: OK

              Is it possible to fix it?

              Thanks

              Michal

            • #12395
              Alexander Bautz
              Keymaster

                Hi,
                When using vLookup to prefill a field enhanced with the autocomplete plugin, the ac-plugin will be initiated before the field in actually filled with the value from the parent items. To overcome this synchronization issue and process the values set buy vLookup, you must use the function “vLookupPresetFromUrlDone” as described here

                You can put the entire function call to your autocomplete functions inside this wrapper, but this will not apply the ac-plugin when not using vLookup as parent.

                My recommendation is to keep the spjs.ac function call as-is, and use the function “spjs.ac.preloadMulti” like this (my example uses “Project” as FIN):

                function vLookupPresetFromUrlDone(fin){
                    if(fin === "Project"){
                        spjs.ac.preloadMulti(fin);       
                    }
                }

                Hope this helps,
                Alexander

              • #12397
                Alexander Bautz
                Keymaster

                  Regarding the multivalue people picker: Are you using the ac-plugin on the people picker in SP2013?

                  When you click the names to fix the “multiple entries” message – are there multiple entries, or do you see only one?

                  Alexander

                • #12411
                  Michal Riha
                  Participant

                    Hi Alexander,

                    thanks a lot, vLookupPresetFromUrlDone works fine!

                    Ad peoplepicker – no, I do not use ac plugin on peoplepicker field,
                    some people has multiple entries but some has only one entry.
                    In any case – peoplepicker is not important for me now, I will not use it. Thanks.

                    Michal

                Viewing 6 reply threads
                • You must be logged in to reply to this topic.