title: Returning an array of abbreviated NotesNames
body: <p>I've got a configuration document on which I use a single field to store the names of evaluators that are assigned to assess some paperwork. In LotusScript, I was able to message those NotesNames into abbreviated names to build my list without too much wrangling. The array of NotesNames will be used in a combobox to allow users to select the evaluator name.</p>
  
  <pre><code>Function getEvaluatorSelections As Variant
      Dim evaluatorArray As Variant
      ReDim evaluatorSelections (0) As String
      Dim count As Integer
      Dim evalName As NotesName
      count = 0
      evaluatorArray = DetermineMultiValueKeyword ("EVALUATORS")
      ForAll entries In evaluatorArray
          ReDim Preserve evaluatorSelections (count)
          Set evalName = New NotesName ( entries )
          evaluatorSelections (count) = evalName.Abbreviated
          count = count + 1
      End ForAll
  
      If count = 0 Then
          getEvaluatorSelections = username
      Else
          getEvaluatorSelections = evaluatorSelections
      End If  
  End Function
  </code></pre>
  
  <p>When I went to do the same in XPages, I got stymied by starting with a Vector and not really understanding how to write SSJS.</p>
  
  <pre><code>var thisdb = session.getCurrentDatabase();
  var dbProfileView = thisdb.getView("dbprofile");
  var evaluatorDoc = dbProfileView.getDocumentByKey("EVALUATORS");
  var evaluatorVector:Vector = evaluatorDoc.getItemValue("Value");
  return evaluatorVector.toArray();
  </code></pre>
  
  <p>That returns the fully distinguished names, which would be enough for me, but certainly not what the client would like to see.</p>
  
  <p>I tried to put the Vector values into an array and get the abbreviated names, but kept getting Error 500s with variations of the code below:</p>
  
  <pre><code>var thisdb = session.getCurrentDatabase();
  var dbProfileView = thisdb.getView("dbprofile");
  var evaluatorDoc = dbProfileView.getDocumentByKey("EVALUATORS");
  var evaluatorVector:Vector = evaluatorDoc.getItemValue("Value");
  var evaluatorArray = new Array (evaluatorVector.toArray());
  var returnArray = new Array(); 
  var evalNames:NotesName;
  
  for(var i=1;i&lt;evaluatorArray.length;i++){
      evalNames = New NotesName ( evaluatorArray[i] );
      returnArray[i] = evalNames.getAbbreviated();
  }
  return returnArray();
  </code></pre>
  
  <p>How do I duplicate what I've in LotusScript over in SSJS? Or have I taken the wrong approach completely?</p>