Avatar of anumoses
anumoses
Flag for United States of America 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

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

Open in new window


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
Oracle Database

Avatar of undefined
Last Comment
anumoses

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
awking00

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
anumoses

ASKER
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
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
anumoses

ASKER
Fixed it. Thanks
anumoses

ASKER
thanks