Solved

Problems with a carriage return delimited list

Posted on 2002-03-07
4
198 Views
Last Modified: 2013-12-24
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
Comment
Question by:Soulive
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 6848127
I think to cover all carriage returns (unix and windows)
use:
chr(10) and chr(13) as delimiters
0
 
LVL 1

Author Comment

by:Soulive
ID: 6848160
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
 
LVL 35

Expert Comment

by:mrichmon
ID: 10784531
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
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10810227
PAQed, with points refunded (100)

Computer101
E-E Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question