Hello Ya'll,
It's been a while since I maintain Oracle Forms 6i. I am trying to create a new field in an existing form based on the following condition:
{If the “Need Category” which is one of an existing items equals “H", then
make the new field called “Core Service” which is a list item type a required field by selecting a value from one of the list of values
else
the new field will only be a display field for read only; }
I created a 'WHEN-LIST-CHANGED' Trigger for the existing 'Need Category' item w/ the following code:
{code}
BEGIN
IF :PROJECT_NEED.NEED_CATEGORY = 'H' THEN
GO_ITEM('PROJECT_NEED.CORE_SERVICE');
SET_ITEM_INSTANCE_PROPERTY('PROJECT_NEED.CORE_SERVICE',
update_allowed,PROPERTY_TRUE);
BELL;
MESSAGE ('please select required core service from a list of
values');
RAISE FORM_TRIGGER_FAILURE;
ELSE
GO_ITEM('PROJECT_NEED.CORE_SERVICE');
SET_ITEM_INSTANCE_PROPERTY('PROJECT_NEED.CORE_SERVICE',
update_allowed,PROPERTY_FALSE);
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
{code}
But, the code does not work regardless the values I have in the 'Inert Allowed' of 'Update Allowed' defined in the property Palette of the new field. Any ideas as to why the above code does not work? or any suggestions to make the new field a required field based on the condition specified above?
Thanks a lot in advance for any/all the help on this!