Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » format mask for number
format mask for number [message #624212] Fri, 19 September 2014 02:18 Go to next message
Mayur Shinde
Messages: 60
Registered: August 2014
Location: Pune, Maharashtra
Hi all,

On my form their is one text item. I have assign a format mask; as if I insert 100.30 then it will return 100.

entered expected result
1000.60 1001
100.20 100
500.90 501

I set format mask to 9999; when I entered 1000.50, it displays message i.e. FRM-40209: field must be of form 9999.

Please suggest me.
Re: format mask for number [message #624216 is a reply to message #624212] Fri, 19 September 2014 02:37 Go to previous message
Messages: 21811
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you set a format mask, Forms expects you to enter values according to that format.

As you want to ROUND entered values, remove format mask from item's property andcreate a WHEN-VALIDATE-ITEM trigger on that item:
:block.item_name := round(:block.item_name);


Oooops! Sorry, I didn't realize that it is an Apex form! In that case, remove format mask and create a dynamic action; its code would be similar to the Forms' trigger:

Which dynamic action to choose? PL/SQL or Set Value might be your choices.

[Updated on: Fri, 19 September 2014 02:39]

Report message to a moderator

Previous Topic: Dynamically Change Datatype
Next Topic: Large Data into Page
Goto Forum:

Current Time: Sat Jun 22 21:11:08 CDT 2024