Solved

Problems with a carriage return delimited list

Posted on 2002-03-07
4
196 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
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

772 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