Re: Forms: Validating an Item before using set_item_property

From: wozi <wozi_at_dhc.net>
Date: Fri, 30 Apr 1999 20:46:01 -0700
Message-ID: <02322B84CCDABF8B.CA20660A2B12992A.3C79FB69A714B5B3_at_library-proxy.airnews.net>


The following example was taken from the help file: /*

  • Built-in: FIND_ITEM
  • Example: Find an item's Id before setting several
  • of its properties. */ PROCEDURE Hide_an_Item( item_name VARCHAR2, hide_it BOOLEAN) IS it_id Item; BEGIN it_id := Find_Item(item_name); IF Id_Null(it_id) THEN Message('No such item: '||item_name); RAISE Form_Trigger_Failure; ELSE IF hide_it THEN Set_Item_Property(it_id,VISIBLE,PROPERTY_FALSE); ELSE Set_Item_Property(it_id,VISIBLE,PROPERTY_TRUE); Set_Item_Property(it_id,ENABLED,PROPERTY_TRUE); Set_Item_Property(it_id,NAVIGABLE,PROPERTY_TRUE); END IF; END IF; END;
Ken Halsted wrote in message <925479606.286.43_at_news.remarQ.com>...
>Here's the question:
>
>How can I validate an Item BEFORE I use set_item_property on it? In other
>words, Is there a way to check for the existence of an Item
>programattically, before issuing a set_item_property command?
>
>I keep getting a FRM error and I was hoping to avoid having to TRAP the
>error.
>
>Thanks for any help at all,
>
>Ken.
>
>--
>_________________
>Kenneth W. Halsted
>Mountaire Corporation
>ph: (501) 399-8812
>url: http://www.mountaire.com
>email: kenman_at_mail.snider.net
>
>
>
Received on Sat May 01 1999 - 05:46:01 CEST

Original text of this message