Home » Developer & Programmer » Forms » How to restrict input data (oracle9i, WndowsXP)
How to restrict input data [message #355481] Fri, 24 October 2008 06:40 Go to next message
Messages: 15
Registered: October 2008
Junior Member
Hi all,
I'm developing an application in Oracle-Forms9i and facing a problem now.

My table is,

Based on this table I've created a form. The ans_type can take either of the following values from an LOV; AlphaNumeric(AN) and Numeric(NM).
The concept is that when i insert data, if i select NM as ans_type, then values acceptable in start_range and end_range also should be of datatype Numeric. And if i select AN as answer_type, vise versa.

Please show me a way.

Thanks in advance.
Re: How to restrict input data [message #355488 is a reply to message #355481] Fri, 24 October 2008 07:57 Go to previous message
Messages: 20847
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess that WHEN-VALIDATE-ITEM triggers on both "start_range" and "end_range" items should check whether the value entered into the item is a number or a character string.

As there's no function like "is_number" or "is_string", you'll have to write one (or both) by yourself. Testing for a number is relatively easy - check what TO_NUMBER returns; if it is a valid number, fine. If not, raise an exception.

A string might then be "everything that is not a number" (possibly).
Previous Topic: How to Get MAC Address within Forms
Next Topic: dynamic selecting checkbox
Goto Forum:

Current Time: Wed Oct 26 06:21:00 CDT 2016

Total time taken to generate the page: 0.07292 seconds