Disable typing of non-numeric characters for numeric item
Hi,
For numeric fields, Oracle Forms checks the entry after the user tries to move out of the item.
But, the requirement is to disable the typing of non-numeric keys when entering data in a numeric item.
pls tell me how to achieve this..
regards,
Asim.
Hi Asim,
You can achieve this by using a PJC (or else you could try using some PL/SQL Code in the KEY-PRESSED Trigger or so.. but not sure).
There is a demo available on OTN on how to achive this using PJC
http://www.oracle.com/technology/sample_code/products/forms/index.html
You could see a Key Filter demo under JavaBeans/PJC Samples (all available as part of the Forms demos).
HTH.
Regards,
Arun
Similar Messages
-
R12 EFT for Germany/ Using Profile ICX:Numeric Characters
Upgrading to Oracle R12.1.1
HP-UX 2000
Company based in US
Hello -
We are trying to setup AP EFT (e-Text) payments for Germany. The amount field is being selected from:
DocumentPayable[1]/PaymentAmount/Value
When we run the process, the EFT file is generated correctly.
However, the users in Germany want the Number format to be 10.000,00 so we have set the Profile option ICX: Numeric Characters FOR THE USER to 10.000,00. The Site level format remains as 10,000.00
After making this change, NO OUTPUT FILE IS CREATED. There is no error in the log file either. Has anyone come across such a problem?
Thanks
Rajeev GoyalThis problem has been solved. It was a bug in one of the Oracle programs that creates BI Extract.
Also, please visit my blog for information on AP Check printing in Oracle R12
http://ora12apps.blogspot.com/ -
Cannot rename file with non-ASCII characters when using the
My application moves files from one directory to another by calling File[] srcFiles = srcDir.listFiles() to get a list of files in the source directory, and then calling srcFiles.renameTo(destFile) to rename each file.
This does not work (renameTo returns false and the file is not moved) under the following circumstances:
- the file's leaf name contains non-ASCII characters, for example "�"
- the OS is Solaris 9
- the LANG and LC_* environment variables are unset, i.e. the C locale is being used
If I set the LANG environment variable to, for example, en_GB.UTF-8 then the rename succeeds.
I have tried calling srcFiles[index].getName().getBytes("UTF-8") and the non-ASCII characters are being replaced with ? (0x3f) characters when LANG is unset.
Is this a bug in the JRE? I would argue that since my code does not actually manipulate the filename (I just use the File object that File.listFiles() gives me) then the rename should succeed. Of course I would not expect the file name to be displayed correctly if I printed it out.
I have reproduced this behaviour with JDK 1.4.2_05 and 1.5.0_04 on Solaris 9.
FrancisThanks for the info Alan.
I considered setting the locale in the environment (this sounds like the "correct" fix to me and we might implement it later), but this application shares a WebLogic server with many other applications so we would have to do a huge amount of testing to make sure that the locale change wouldn't break the other apps. In the end I worked around the problem by making the code that generates the filenames in the first place strip out any non-ASCII characters (the names of the files are not critically important).
Looking forward to JSR-203, in the meantime perhaps a note about this behaviour in the java.io.File javadoc would be useful. -
Is there a way to register non-speaking characters as characters?
Last question for today, I promise:
My script has a lot of non-speaking characters. I would like them to show up on the character reports. Obviously, whenever I highlight their names in the script and set them to "characters", their names are centered and formatted for dialogue, which makes the script totally confusing. Is there another way to mark these characters, whose names only appear in the "action", as characters?
Thanks!You can manually enter "Non-speaking characters" for a scene from the "Scene Properties" panel on the right side.
Also, if a word has been user as "Character" element at least once in the script, then in case it is appearing in Action element, it'll automatically be detected as a Non-speaking character.
Thanks -
Hello
I have seen some posts about this topic, but none helped me.
I need to send to a device, via serial port (rs-232), four codes composed by printable and non-printable characters
For instance, I need to send a string with ASCII character 224, ASCII character 87, ASCII character 10, ASCII character 0 and ASCII character 191, together in the same string
Can someone help me to do this?
ThanksWhat part are you having trouble doing?
To create those ASCII characters you can use a string constant or control set to '\' codes or hex display.
Lynn -
Catching errors such as divide by zero and typing non-numeric characters
Fellows: How do I extend following script to catch errors such as divide by zero and typing non-numeric characters. Thanks
This program takes two integers (whole numbers), then displays the sum, average, division,
Modula of those numbers and finally the first number raised to the power of the second number.
import java.io.*;
public class HWOne
public static void main(String[] args) throws IOException // error handling
// variable declaration
String firstdigit, seconddigit;
int first, second, sum, total, modus, power;
float division;
double average;
BufferedReader myIn = new BufferedReader(new InputStreamReader(System.in));
//Invoke user response
System.out.print("Please enter first digit ");
firstdigit = myIn.readLine();
first = Integer.parseInt(firstdigit);
System.out.print("Please enter second digit ");
seconddigit = myIn.readLine();
second = Integer.parseInt(seconddigit);
//computations
sum = first + second;
average = (double)sum / (double)2;
division = (float)first / (float)second;
modus = first % second;
power = (int)Math.pow(first, second);
//Screen message
System.out.println("Sum: " + sum);
System.out.println("Average: " + average);
System.out.println("Division: " + division);
System.out.println("Modula: " + modus);
System.out.println("Power: " + power);Have you learnt about try/catch statements yet?
The parseInt method throws a NumberFormatException. So you place the call to that method inside a try statement and catch the exception.
For divide by zero, you can use an if statement. If the divisor != 0 perform division. -
Restating my issue / question...
When I send email from this iMac, there is a string of characters assigned. The characters are all the "alpha numeric" characters on the QWERTY key board. This only occurs when email is sent from this iMac. The issue does not manifest when using any other lap top or computer.
Hence, I have ruled out the issue is a yahoo mail matter.
Again, I can access the Yahoo mail account form multiple devices and send email without unintended assignment of character strings, but when I send wmail using this iMac, the issue happens everytime.
Characters are stacked verticaly in a column. It looks as if all characters (except function keys) are included in the string.
Any ideas?
GMcPlease read this whole message before doing anything.
This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.
These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.
Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects.
Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands.
Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
Launch the Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.
Step 1
Triple-click the line of text below to select it:
kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -f -a TextEdit
Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
Step 2
Repeat with this line:
{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; sudo defaults read com.apple.loginwindow LoginHook; } | open -f -a TextEdit
This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step.
Step 3
launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}' | open -f -a TextEdit
Step 4
ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit
Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.
Step 5
osascript -e 'tell application "System Events" to get name of every login item' | open -f -a TextEdit
Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output.
You can then quit Terminal. -
Safari "tel:" phone number links stripping non-numeric characters
After a week of owning my iPhone (two weeks after it launched) I made myself a little web interface that contain various iPhone-helpful links. Four of these were AT&T specific telephone links:
*646# - check how many minutes remaining
*729 - pay your bill
etc etc..
(e.g. <a href="tel:*729">click here to pay your bill</a>)
Well, needless to say this was a very convenient feature, however these links no longer function properly. It seems that the iPhone is now stripping any/all non-numeric characters from the link (although I haven't done extensive testing to see exactly which characters .. only with * and $ in particular).
I've even tried HTML entities but they were stripped too.
Now I know apple had a security fix a few patches back, one that fixed a vulnerability involving "tel:" links (CVE-2007-3755), but I haven't found any documentation regarding special characters now being ignored/stripped.
So, my question is does anyone know if there is a workaround for this, or did the patch inadvertently and permanently destroy the ability to send these very helpful text messages via a web interface?
Thanks,
MarcI'm having a similarly annoying behavior with "tel:" links. I'm doing the same thing -- writing a web page to store some convenient numbers, but for me, it's for teleconference numbers. You dial into a toll-free number, then after a pause, dial in a passcode.
On the iPhone's contact list, you can program in the pauses as the letter "p."
However, in a tel: link, the p's change to 7's. Interesting!
What I've discovered is that, for me (FW 1.1.2), alphabetical characters are translated into their numerical equivalents. So 1-800-COMCAST (a number I've had to dial all too much recently) gets rendered to 18002662278.
This is a difference between Safari 3 and the iPhone version. On Safari 3 on the Mac, both the HTML and a mouseover shows that the tel link contains the letters. On the iPhone, though, clicking the link brings up a dialog box with the letters "translated."
So, interesting -- but now I have a problem. How do I enter a pause into a tel link? -
How can I remove non-numeric characters from a cell?
I have a file an rtf file that I can open in Numbers. It puts each line in a separate cell. Each cell contains non-numeric and numeric characters. I'd like to delete the non-numeric characters so that I can add the numbers together. Is there a way to do this easily in Numbers that doesn't require doing it manually?
Thanks,
DavidOk, David,
This solution will work for vlaues up to 99,000 and if there is a space in front of your amount. There are two parts for clarity but you could wrap them up into one formula if you wanted to.
B2 =FIND(" ",A2,LEN(A2)−9)
C2 =MID(A2,B2,10)
If there is a return before your amount (certain cells in your screenshot got me wondering) then the formula in column B
=FIND("
",A2,1)
It looks funny because it is finding the return.
Let me know if this works for you.
quinn -
Removing non-alpha-numeric characters from a string
How can I remove all non-alpha-numeric characters from a string? (i.e. only alpha-numerics should remain in the string).
Or even without a loop ?
Extract from the help for the Search and Replace String function :
Right-click the Search and Replace String function and select Regular Expression from the shortcut menu to configure the function for advanced regular expression searches and partial match substitution in the replacement string.
Extract from the for the advanced search options :
[a-zA-Z0-9] matches any lowercase or uppercase letter or any digit. You also can use a character class to match any character not in a given set by adding a caret (^) to the beginning of the class. For example [^a-zA-Z0-9] matches any character that is not a lowercase or uppercase letter and also not a digit.
Message Edité par JB le 05-06-2008 01:49 PM
Attachments:
Example_VI_BD4.png 2 KB -
Removing non-numeric characters from string
Hi there,
I need to have the ability to remove non-numeric characters from a string and I do not know how to do this.
Does any one know a way?
Example:
Present String: (02)-2345-4607
Required String: 0223454607
Thanks in advanceDear NickM
Try this this will work...........
create or replace function char2num(mstring in varchar2) return integer
is
-- Function to remove Special characters and alphebets from phone no. string field
-- Author - Valid Bharde.(India-Mumbai)
-- Date :- 20 Sept 2006.
-- This Function will return numeric representation.
-- The Folowing program is gifted to NickM with respect to his post on oracle site regarding Removing non-numeric characters from string on the said date
mstatus number :=0;
mnum number:=0;
mrefstring varchar2(50);
begin
mnum := length(mstring);
for x in 1..mnum loop
if (ASCII(substr(upper(mstring),x,1)) >= 48 and ASCII(substr(upper(mstring),x,1)) <= 57) then
mrefstring := mrefstring || substr(mstring,x,1);
end if;
end loop;
return mrefstring;
end;
copy the above program and use it at function for example
SQL> select char2num('(022)-453452781') from dual;
CHAR2NUM('(022)-453452781')
22453452781
Chao!!! -
Replace Non-Numeric Characters with a Numeric Character in a String
Hi Guys,
I need to replace all the non-numeric characters (including embedded blanks & hyphen) in a string to a numeric character '1'.
The trailing blanks should not be replaced.
e.g. "P22233344455566" should be changed to "122233344455566"
& "49-1234567 " should be changed to "4911234567 "
Please help.Use [replace|http://help.sap.com/abapdocu_70/en/ABAPREPLACE_IN_PATTERN.htm] with a regular expression to translate any non-numeric character (i.e. any character not between 0 and 9) to 1:
REPLACE ALL OCCURENCES OF REGEX '[^0-9]' IN value WITH '1'.
Cheers, harald
p.s.: In older releases [translate|http://help.sap.com/abapdocu_70/en/ABAPTRANSLATE.htm] would also do the trick, but is more lengthy, because one would need to specify each individual character that should be replaced, e.g.:
TRANSLATE value TO UPPER CASE.
TRANSLATE value USING
' 1_1-1a1b1c1d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1'. -
Removing Non-numeric characters from Alpha-numeric string
Hi,
I have one column in which i have Alpha-numeric data like
COLUMN X
+91 (876) 098 6789
1-567-987-7655
so on.
I want to remove Non-numeric characters from above (space,'(',')',+,........)
i want to write something generic (suppose some function to which i pass the column)
thanks in advance,
MandipThis variation uses the like operators pattern recognition to remove non alphanumeric characters. It also
keeps decimals.
Code Snippet
CREATE FUNCTION dbo.RemoveChars(@Str varchar(1000))
RETURNS VARCHAR(1000)
BEGIN
declare @NewStr varchar(1000),
@i int
set @i = 1
set @NewStr = ''
while @i <= len(@str)
begin
--grab digits or (| in regex) decimal
if substring(@str,@i,1) like '%[0-9|.]%'
begin
set @NewStr = @NewStr + substring(@str,@i,1)
end
else
begin
set @NewStr = @NewStr
end
set @i = @i + 1
end
RETURN Rtrim(Ltrim(@NewStr))
END
GO
Code to validate:
Code Snippet
declare @t table(
TestStr varchar(100)
insert into @t values ('+91 (8.76) \098 6789');
insert into @t values ('1-567-987-7655');
select dbo.RemoveChars(TestStr)
from @t -
Select only non-numeric characters
A
$
^
(78^*)5$#7
)!@#$0-99
_454*(&--0
+@#$%564
=123
How select only non-numeric characters from above table?Nilesh Hole,Pune, India wrote:
but i want a uniqe query.
suppose table have n number of rows then how i will wirte a query.Not sure what you mean? Do you want to select a list of distinct non-numeric characters used in your table? Then:
column "Distinct non-numeric chars" format a30
with t as (
select '!' a from dual union all
select '@' from dual union all
select '#' from dual union all
select '$' from dual union all
select '%' from dual union all
select '^' from dual union all
select '&' from dual union all
select '*' from dual union all
select '(78^*)5$#7' from dual union all
select ')!@#$0-99' from dual union all
select '_454*(&--0' from dual union all
select '+@#$%564' from dual union all
select '=123' from dual union all
select '135790' from dual
select distinct substr(a,column_value,1) "Distinct non-numeric chars"
from (
select regexp_replace(a,'[[:digit:]]') a
from t
where not regexp_like(a, '^[[:digit:]]+$')
table(
cast(
multiset(
select level
from dual
connect by level <= length(a)
as sys.odcinumberlist
Distinct non-numeric chars
+
=
$
Distinct non-numeric chars
^
14 rows selected.
SQL> SY. -
RegEx Query - non alpha numeric characters
Hi,
On our Oracle EBS system users can paste data into the system and "strange" characters are not trapped, therefore they can paste into forms from e.g. word and include non standard characters. Sorry if that sounds vague.
I need to be able to find the non alphanumeric chars in a table which are "breaking" an interfaced system which takes data from Oracle and puts some of it into an XML file. Other valid characters we don't have a problem with are e.g.
!"£$%^&*()_+-=[{]};:'@,<.>/?\|
For example, I know one character that causes a problem is the character MS Word uses to replace a dash.
e.g. if I type:
*this - that*
Word changes it to:
*This – that*
That's a character I can't type on my keyboard, and an example of a character I'd like to be able to find using SQL.
There are probably others, but all I would like to do is to find "non standard" characters.
I have one sample transaction ID I know contains the funny MS dash, so this SQL returns it:
SELECT pec.expenditure_comment
FROM pa.pa_expenditure_comments pec
WHERE REGEXP_LIKE (pec.expenditure_comment
, '(^ )|[^[:alnum:] &!"£$%^()_+=-{};:@#~,<.>/?\|]')
AND pec.expenditure_item_id = 6445260However, it also returns other records which don't contain funny characters, so I don't think it is working correctly.
Hence me asking for advice here. Any assistance would be much appreciated.
Thanks966480 wrote:
Hi,
On our Oracle EBS system users can paste data into the system and "strange" characters are not trapped, therefore they can paste into forms from e.g. word and include non standard characters. Sorry if that sounds vague.
I need to be able to find the non alphanumeric chars in a table which are "breaking" an interfaced system which takes data from Oracle and puts some of it into an XML file. Other valid characters we don't have a problem with are e.g.
!"£$%^&*()_+-=[{]};:'@,<.>/?\|Are the square bracket characters, '[' and ']' acceptable? The code you posted below doesn't allow them.
For example, I know one character that causes a problem is the character MS Word uses to replace a dash.
e.g. if I type:
*this - that*
Word changes it to:
*This – that*
That's a character I can't type on my keyboard, and an example of a character I'd like to be able to find using SQL.
There are probably others, but all I would like to do is to find "non standard" characters.Thee are some built-in character classes, such as [:print:] and [:graph:], that might make this job a little simpler for you.
I have one sample transaction ID I know contains the funny MS dash, so this SQL returns it:
SELECT pec.expenditure_comment
FROM pa.pa_expenditure_comments pec
WHERE REGEXP_LIKE (pec.expenditure_comment
, '(^ )|[^[:alnum:] &!"£$%^()_+=-{};:@#~,<.>/?\|]')
AND pec.expenditure_item_id = 6445260
The hyphen character ( '-' ) has a special meaning inside square brackets. If you want to include a literal hyphen in the set, then put it at the very beginning (right after the '[') or the very end (right before the ']'); for example:
WHERE REGEXP_LIKE (pec.expenditure_comment
, '(^ )|[^[:alnum:] &!"£$%^()_+={};:@#~,<.>/?\|-]')
{code}
The right square bracket, ']', also has a special meaning: it ends the set. If you want to include a literal right ']' in the set, it must be the very first character. The following code does not find the square brackets funny:
{code}
WHERE REGEXP_LIKE (pec.expenditure_comment
, '(^ )|[][^[:alnum:] &!"£$%^()_+={};:@#~,<.>/?\|-]')
However, it also returns other records which don't contain funny characters, so I don't think it is working correctly.The query you posted, and both of my suggestions, will pick strings that start with a space, whether or not any funny characters come later. If you want to accept strings whether or not they start with spaces (just so long as they do not contain any funny characters) then lose the '(^ )|'; for example:
WHERE REGEXP_LIKE (pec.expenditure_comment
, '[][^[:alnum:] &!"£$%^()_+={};:@#~,<.>/?\|-]')
{code}
>
Hence me asking for advice here. Any assistance would be much appreciated.I hope that answers your question.
If not, post some sample data (CREATE TABLE and INSERT statements) so people can re-create the problem and test their ideas. Also post the correct results you want from the given sample data.
Edited by: Frank Kulash on May 31, 2013 10:11 AM
Maybe you are looking for
-
How can I recover my data from my hard drive
About 2 weeks ago I was uploading pictures to my computer when it froze. I turned it off by holding down the power key, and started it up again. It hasn't gone past the apple screen and the spinning dial since. I have tried all the troubleshooting my
-
Hard disk error on Toshiba Satellite A505 56980
Hello, Windows keeps bringing up a notification that the hard disk on my Toshiba laptop(A505 56980) has errors. It recommends for me to get hardware technical support to determine if the disk can be repaired or needs to be replaced. My disk name is T
-
External HD projector DVI / Thunderbolt / HDMI ?
Hi I have two MBPs , one vs10.5 and a recently bought one with vs 10.9 installed. I do Video movies in HD 1920 x 1080, which I project on a large screen using an HD 1920 x 1080 projector. With my 10.5, I connect it to the projector using a DVI to HDM
-
Real time configurations for derivation types in COPA
We have taken the sample operating concern by going thru the path < IMG Activity: Controlling - operating concern - sap operating concern template >, the Quickstart S-GO operating concern template> and configured the following derivation types by loo
-
How can view/access Enterprise manager to other user?
Hi, We have one request regarding accessing grid enterprise manager console. I have create user TEST which privilege required to view/access the db console using this user?.