2 Replies Latest reply on Feb 20, 2014 6:23 AM by jason_clement

    Script UI Listbox Values


      I think I have been looking at this too long, the weird thing is it kind of works.


      I have created a script that finds the headers in a tab-delimited text file, allows the user to choose the headers they want (from a listbox), takes them to another window that allows them to rearrange the list to be in the order the user wants (thank you Peter Kahrel for the ScriptUI beginner's guide), allow the user to choose whether a tab, forced line break, etc. follows the field and show everything in a preview window (edittable text box).


      I'm stuck. When I try to pull the chosen fields out of the list box I run into problems - but the values are there. If I simply do an alert on each value of the array I get the field name no problem (last name, first name). However, if I try to assign the value to a string to populate the preview window with I get the index numbers (0,1).


      I'm at a absolute loss as to why this is not working. I have tried everything I can think of and read every disucssion I can find. The preView function is below. Any help would be appreciated.


      function preView (selFields){

          if (selFields instanceof Array){


              for (var i=0; i < selFields.length; i++){

      //~             pop_etext = pop_etext + selFields[i];