Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to make a field required for data entry in forms 6i?

jtomasicSep 25 2017 — edited Sep 29 2017

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!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2017
Added on Sep 25 2017
10 comments
1,007 views