AnsweredAssumed Answered

Default selection for multi value List Lookup Control

Question asked by on Dec 3, 2015
Latest reply on Jan 10, 2016 by



I have a sharepoint list which has a lookup field which can contain multiple entries.  So in edit mode what my Nintex form shows for this field is a "List Lookup" control.  The issue is that I would like the control to start out with a default selection.


I've looked online to see how this can be done but the nearest thing I could find was this.  This doesn't work for me because I do not have a single drop down box.  The "List Lookup" control, when used on a field that can have multiple values selected is actually two select boxes with arrows between.  I looked pretty deeply into how Nintex does this and it uses Java script to move entries from one select element in response to double click or pressing the add/remove buttons.  This means I cannot simply modify these select elements, I need to use a similar mechanism that the complex control is using.


Does anyone know how this can be done?  I looked at the final code with a DOM inspector at how this was being done and I see that when e.g. "Add" is clicked there is a function called "GidAddSelected" or so.  I can't use this function because I haven't selected anything.  I suppose it would be possible to select the entries in the left select and then call this function to make the magic happen but this strikes me as a very nasty way to accomplish something that seems like a pretty obvious use case: I simply want to pre-populate the left side with default values.


I also looked at how to set the defaults in the sharepoint list... but the only solution appears to involve running jquery on the default sharepoint form.


P.S. Is there any documentation available for the Javascript API?  The only mention I could find was a link to an SDK msi zip file (p.p.s. msi files are already compressed so zipping them will either do nothing or make them even larger)!  First of all, documentation should be viewable in a browser without downloading anything (you can hide it behind a login if you wish).  Second of all, if you insist on having me download something it cannot be a zip or an msi.  Many large companies will not let you download zips.  Even more prohibit you from downloading an msi.  By having the file be both you practically gauarantee that I cannot download it.