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
select case when trim(TRANSLATE('99','0123456789', ' ')) is null then 'numeric' else 'alpha' endfrom dualSELECT 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_numericFROM 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
OK. After I get the value how to I use the set item property or use that format mast only on the field required but not changing the other values to ######
Helena Marková
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.
anumoses
ASKER
Error when I use the function in the form error.jpg