Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problems with a carriage return delimited list

Posted on 2002-03-07
4
Medium Priority
?
202 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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

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…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

610 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