Thanks Doug ... Yes I do want clean data. And doing it quietly would probably be the most 'correct' way ... but any command I could use that might transmit a slight electrical shock with the message could be somewhat satisfying ... :)
I'll give the RTRIM a try ! Susan On Thu, Aug 23, 2012 at 3:50 PM, Mueller, Doug <[email protected]> wrote: > ** > > Susan,**** > > ** ** > > Just checking on the requirement…**** > > ** ** > > What is the end result goal?**** > > ** ** > > I suspect it is that you don't want to have extraneous white space at the > end of strings and would like for**** > > the data to be entered without that extra whitespace.**** > > ** ** > > If that is the final goal, why not just clean the data and forget about > error messages. What are you going to**** > > do, give an error that the data is bad so the user has to go and remove > the extra return (or space or tab) and**** > > go again? Wouldn't it be better to simply clean it quietly and move on?** > ** > > ** ** > > With this in mind, would the RTRIM function do what you are looking for? > It removes whitespace. And, I**** > > assume it is not just CR you want not there, but also why have trailing > spaces or tabs. So, if RTRIM does**** > > indeed include CR as whitespace, you should be good to go. No error > report, data clean, no disruption of user,**** > > you get what you need.**** > > ** ** > > If RTRIM itself doesn't work, you could put a little loop in place that > does an RTRIM (to get rid of spaces and**** > > tabs) then an if 'field' LIKE "%" + "**** > > " and if matches, trim the length by one and loop back before the RTRIM. > If it doesn't match (else) jump out**** > > of the loop.**** > > ** ** > > Of course, if you really really want to give the user an annoying error, > you can…..**** > > ** ** > > And, as someone mentioned, to get a return character in a qualification > just type it in between quotes. So,**** > > enter a ", hit the return, enter another " and you will have a return > captured. But, be careful as there could**** > > be any number of CRs in the middle of text and there could be any number > at the end of the text too; and**** > > returns could have spaces or tabs between them.**** > > ** ** > > Just something to think about.**** > > ** ** > > Doug Mueller**** > > ** ** > > *From:* Action Request System discussion list(ARSList) [mailto: > [email protected]] *On Behalf Of *Susan Palmer > *Sent:* Wednesday, August 22, 2012 3:01 PM > *To:* [email protected] > *Subject:* Data validation in character fields**** > > ** ** > > ** **** > > Hi everyone,**** > > **** > > On a regular form with a character field I need to be able to validate > that there are no 'carriage returns' at the end of the data.**** > > **** > > Example:**** > > The field should contain - ABC Company**** > > **** > > but instead it contains -**** > > ABC Company**** > > ABC Company**** > > ABC Company**** > > **** > > This is purely a human error during input. They may be copy/pasting from > a spreadsheet and somehow do paste more than once or any other creative way > of doing this. Unlikely they are actually typing this. The field length > is 100 characters, 76 of which display. But since only 1 row is displayed > it's not evident when you look at the record that the above situation > occurs.**** > > **** > > So I want to put a filter in that will produce an error when there is a > 'carriage return' (or whatever they are called these days) upon save. But > I cannot figure out how to create that special character in the > qualification line. I was thinking something like 'Site Name' LIKE > "%symbol" but I don't know what to put where the word symbol is. There is > never a situation when we want the CR.**** > > **** > > From a Remedy perspective this whole thing doesn't even matter. But we > have other systems that suck the data out of Remedy and they break when > they get this data. No suitable comment available for that issue.**** > > **** > > I'd appreciate any ideas you may have.**** > > **** > > Thanks,**** > > Susan **** > > **** > > Susan Palmer**** > > ShopperTrak**** > > 200 W Monroe 11th Floor**** > > Chicago, IL 60606**** > > 312-529-5325**** > > [email protected]**** > > **** > > ARS v7.5**** > > Oracle 10g**** > > User Tool v7.5**** > > Sun Solaris**** > > **** > > **** > > _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_ **** > _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_ > _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

