Dynamically Change Datatype [message #623923] |
Tue, 16 September 2014 04:52 |
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 |
|
Littlefoot
Messages: 21823 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.
|
|
|