This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.



Dec 8, 2016, 5:32 PM
68 Posts

list.unShift() doesn't work if the Array has only one value?

  • Category: Debugging
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 1

I recently discovered that in any new xPages, or on Domino 9, the list.unshift() function does NOT work if the list (array) only has one value.  When did this break?

I need to be able to prepend a blank value in many combo boxes, even if the "list" in that field only has one value.  How do you do that now?

Dec 11, 2016, 7:42 PM
589 Posts
doh

I started with the older posts...  looks like you made good progress on your own.

Again - Code really helps...  I have no idea what this list.unshift() is or how it's being used. 

IF your problem is you want to make sure everything returned back is an array... I wouldn't try to just prepend another value...  I would try and convert the single value to an array.  An array can hold one value..  I forget how to do that... but googling should get you there.  on openntf there are some functions to force an @DbColumn and @DbLookup to an array so that would have an example there as well.

Good Luck!


This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.