Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Dynamically Change Datatype (Oracle 10g,Win 7 32 bit,Apex 4.0)
Dynamically Change Datatype [message #623923] Tue, 16 September 2014 04:52 Go to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
Hello,

I have one select list for datatype like ( char,number) and one text filed for entry purpose. when user select char in select list then the text field datatype should be char type and if its select number then the text field should change its datatype to number.So Is there any dynamic functionality available in apex to change the datatype of field at run time.




Thanks,
Xandot
Re: Dynamically Change Datatype [message #623925 is a reply to message #623923] Tue, 16 September 2014 05:13 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Not that I'd know.

Anyway, this "requirement" sounds rather strange. What do you do with that item? Store its value into a table? Something different?

If the same item is designed to accept both numbers and characters, its datatype should be VARCHAR2. If you want to check whether you've entered strictly numbers into it, create validation which uses
REGEXP_LIKE(:item_name, '^\d+$')
and you're done. But, changing item's datatype during runtime? I've never heard of it.
Previous Topic: Function in Logo field
Next Topic: format mask for number
Goto Forum:
  


Current Time: Fri Mar 29 02:23:11 CDT 2024