If you have developed several Sharepoint Nintex forms, you will undoubtedly have used Choice dropdown controls. In one instance the dropdown will display a list of options from a SharePoint List. This is easy enough to do, simply setup the correct filters and you’re almost there.

When more control data is needed, you will most likely make an AJAX call via Javascript to a Web API or Web Service. When this happens, you will need to populate the dropdown with the data stored in the Web API’s response.

Below is an example of how you can easily populate a choice dropdown via Javascript using JSON data obtained via a web api call:

NWF$('#' + ddlEmployees).prop('disabled',false);

//Add count of results as first item
EmployeeSearchResultLookup.append('<option value=\"-1\">'+data.employees.length+ ' results returned' + '</option>');

NWF$.each (data.employees, function (key, value) 
{ 
	EmployeeSearchResultLookup.append('<option value=' + value.employeeId+ '>' + value.fullName + '</option>');
});
NWF.FormFiller.Functions.ProcessOnChange(NWF$('#' + ddlEmployees));

Any questions let me know!