• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

Problems with a carriage return delimited list

I have a text area that I have people paste multiple employee numbers from a spread sheet column. This equates to a one line per item list. Another forum user helped me by telling me that I could manipulate this text area as a list by using the Chr(13) variable which is the ascii eqivalent of a carriage return. Everthing works fine HOWEVER, there always seems to be a phantom item at the end of the list because the text area adds an extra carriage return to the end of the paste. If i paste 8 employee numbers, the listLen() will be 9. My logic told me to first Trim() the textarea before manipulating it as a list. Next, test the length and contents of each list item and if it was Len(listitem) of 0 and blank "" on the contents, I would do a listDelete at that spot. NO DICE. Any ideas?

0
Soulive
Asked:
Soulive
1 Solution
 
cheekycjCommented:
I think to cover all carriage returns (unix and windows)
use:
chr(10) and chr(13) as delimiters
0
 
SouliveAuthor Commented:
Well, I solved my own problem.  I simply did a ListChangeDelims(chr(13),",") and it didn't carry that last carriage return over as a list item.  
0
 
mrichmonCommented:
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation in the Cleanup topic area:

PAQ/Refund

Please leave any comments here within the next four days.

mrichmon
EE Cleanup Volunteer
0
 
Computer101Commented:
PAQed, with points refunded (100)

Computer101
E-E Admin
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now