Quantcast
Channel: Nintex Connect: Unanswered Threads
Viewing all articles
Browse latest Browse all 2462

Javascript populated Multiselect List Lookup Control

$
0
0

Using javascript I have successfully populated a List lookup control with items from a SP list by setting the ClientID javascript variable of the control .  However, when I set the control to allow multiple items the list items are loaded in the list box on the right (aka the added items) instead of on the left.  Has anyone else experienced this?  Better yet, does anyone know how to resolve this?

Here is my javascript included code:

function MyFunction()
{
  this.getListItems = function()
  {
       var restQuery = "http://myurl/sites/multiselecttest/_vti_bin/listdata.svc/LookupList"
       NWF$.getJSON(restQuery, function (data)
       {
          var options = "<option value='0'>Please Select an item</option>";
          NWF$(data.d.results).each(function ()
           {
               options += "<option value='" + this.Id + "'>" + this.Title + "</option>";
           });
          NWF$("#" + drpList).html(options);
       });
   }
}

And here is the Custom Javascript in the form settings.

 NWF$(function () {
    function GetData() {
       var data = new MyFunction();
      data.getListItems();
   }
   GetData();
});


Viewing all articles
Browse latest Browse all 2462

Trending Articles