I'm not sure which version(s) it applies to.  Including the 2nd string 
completely will work for TRANSLATE on all versions.

For a shorter method (on Oracle 10 and later which Remedy 7.1 and later need)
  Select RegExp_REPLACE('$field$', '([[:alnum:]]|[-_])') from dual

Fred

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Joe Martin D'Souza
Sent: Tuesday, June 14, 2011 4:56 PM
To: [email protected]
Subject: Re: Character String Check

That was a limitation in some earlier versions of Oracle which I think are 
removed now?

Joe

-----Original Message----- 
From: Grooms, Frederick W
Sent: Tuesday, June 14, 2011 5:53 PM Newsgroups: 
public.remedy.arsystem.general
To: [email protected]
Subject: Re: Character String Check

Sorry ... I checked one of mine and it should be (Returns added here for 
readability)

Select Replace(TRANSLATE('$Field$',
  'ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789_abcdefghijklmnopqrstuvwxyz',
  '----------------------------------------------------------------'),'-','') 
from DUAL

There is an odd thing about Translate on some versions of Oracle... It wants 
the same number of characters in both strings

Fred

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Grooms, Frederick W
Sent: Tuesday, June 14, 2011 4:48 PM
To: [email protected]
Subject: Re: Character String Check

No ... It returns the list of bad characters found (so if anything is left 
over then you can show then what characters they entered that were bad)

The 2nd AL
  Run-If   'Display Only Temp Field' != $NULL$
  Action    Show Error Message

Fred

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Kemes, Lisa
Sent: Tuesday, June 14, 2011 4:37 PM
To: [email protected]
Subject: Re: Character String Check

I tried this as well, and not sure why, but q### is returning nothing.

It should return ### correct?

Lisa


-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Grooms, Frederick W
Sent: Tuesday, June 14, 2011 2:58 PM
To: [email protected]
Subject: Re: Character String Check

Something like this is where I usually take advantage of the Oracle 
database's TRANSLATE function.  I do a set fields (to a Display only field) 
translating all letters and numbers to nothing (as well as hyphen and 
underscore in your case).  If there any characters left over then in a 
second filter I show an error.

SQL Set Fields
   Select TRANSLATE('$Field$', 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789_abcdefghijklmnopqrstuvwxyz','') from 
DUAL


In pure Remedy you could do a series of replacements to remove each 
character and that will do the same thing.

Fred


-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Kemes, Lisa
Sent: Tuesday, June 14, 2011 1:31 PM
To: [email protected]
Subject: Character String Check

**
I need to check a character field to make sure that the string in the field 
is alphanumeric and the only special characters that are allowed are a 
hyphen "-" or an underscore.  No spaces allowed either.

I've tried a bunch of workflow and it's just not working for me.


Lisa Kemes
AR System Developer
TE Information Systems
Global Infrastructure and Ops
+01 717 810 2408 tel
+01 717 602 9460 mobile
[email protected]
MS 161-43
P.O. Box 3608
Harrisburg, PA 17105-3608


www.te.com

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug11 
www.wwrug.com ARSList: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are" 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

Reply via email to