CASC with multi-select people picker

Forums Cascading dropdowns CASC with multi-select people picker

Viewing 1 reply thread
  • Author
    Posts
    • #33032
      Kasey
      Participant

      I have a list with Category, Sub-Category and Recipients (multi-select people picker). I would like to use SPJS-Casc for the Category and Sub-Category and somehow pull in the values of the Recipients for use in DFFS Emails. I’ve tried a few things but haven’t found a workable solution yet. I tried using Recipients in the casc but that ends up being a select where I have to select which recipient. I’ve tried the set value option but that threw an error. Whats the best way to get my recipients into a field or variable for use in the email functionality based on my selection of Category and Sub-Category?

    • #33044
      Alexander Bautz
      Keymaster

      I tried it and found that I had to update SPJS-Casc.js to support setting a mulitchoice people picker in the setFields. Download the attached file, rename it to SPJS-casc.js and replace the one you have in /SPJS/DFFS/plugins.

      Now add it like this in your cascading dropdown config:

      "setFields": [{
        "from": "YourMultichoiePeoplePicker/Name",
        "to": "YourMultichoiePeoplePicker",
        "parseFunction": "parseMultiPP"
      }]

      and add this to your custom js:

      function parseMultiPP(a){
          var arr = [];
          if(a.results !== undefined){
              jQuery.each(a.results, function(i,user){
                  arr.push(user.Name);
              });
              return arr;
          }
      }

      Let me know how this works out.

      Alexander

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