View Single Post
  #5  
Old July 25th, 2013, 11:52 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 487
Default Re: Alphabetize a list

Dan, I tested the array rule you have here using the data typed into the rule and it works great. I am wondering how I would use an external data file to accomplish this same thing. I have attached a sample data file, these are in alphabetical order right now but won't be when I run the job. How would I write the rule with each option being in it's own field. I would want to ignore the first field in the external data file though, that field is what I am going to try and link the source data to. TIA

I tried this but get an error "myData.split is not a function"

Code:
var myData = new ExternalDataFileEx("BeerListHeader.txt", "\,");
var myArray = myData.split("\,");
return myArray.sort().join("<br>\n");
Attached Files
File Type: txt BeerListHeader.txt (854 Bytes, 7 views)
__________________
Don Reimer - JavaScript Novice

MAC OS 10.14.6 Acrobat DC FP Creator 12.0.1

Last edited by dreimer; July 25th, 2013 at 01:11 PM..
Reply With Quote