anumoses
asked on
Format mask - oracle forms- Forms [32 Bit] Version 11.1.1.4.0 (Production)
I have a multi item block and the dsp_values is 60 characters. (character field)
Now I am trying a put a new value that is number. I need to have a format mask. In oracle forms there is not set_item_instance_property for Format Mask. I have 2 functions
How can I use this for the new value . No decimals allowed. Other values in that field are character. Enclosing the screen print. When I put the value 80.0 the other values change to #####
two.jpg
one.jpg
Now I am trying a put a new value that is number. I need to have a format mask. In oracle forms there is not set_item_instance_property
select case when trim(TRANSLATE('99','0123456789', ' ')) is null
then 'numeric'
else 'alpha'
end
from dual
SELECT CASE WHEN INSTR('-1.-2','-')>1 THEN 'alpha' --if minus is not the very first symbol then ‘alpha’
WHEN '-1.-2' LIKE '%.%.%' THEN 'alpha'--if more than 1 period then ‘alpha’
WHEN '-1.-2' LIKE '-%-%' THEN 'alpha'--if more than one minus then ‘alpha’
WHEN REGEXP_LIKE('-1.-2','^[-0-9.,]*$') THEN 'numeric' --if all symbols are digits, a period, or a minus then ‘numeric’
ELSE 'alpha'
END is_numeric
FROM dual
How can I use this for the new value . No decimals allowed. Other values in that field are character. Enclosing the screen print. When I put the value 80.0 the other values change to #####
two.jpg
one.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In forms there cannot be two format masks on the same item. As I see added pictures you can remove format mask from item "Value" and use awking00's function for validation of input e.g. in a When-Validate-Item trigger.
ASKER
Error when I use the function in the form
error.jpg
error.jpg
ASKER
Fixed it. Thanks
ASKER
thanks
ASKER