Re: Forms 4.5 question, item Updateable property

From: Tony Rothwell <tony_at_santen.demon.co.uk>
Date: 1996/10/23
Message-ID: <X++88JAC+obyEwoT_at_santen.demon.co.uk>#1/1


In article <326D8B3F.40C8_at_castle.net>, Sadru Fidai <sfidai_at_castle.net> writes
>Hi,
>
>I have come across a situation where forms 4.5 behaves differently from
>its 3.0 counterpart.
>
>Consider a block with no base table. I would like, based on certain
>conditions, to allow or disallow entry into the items belonging to this
>block. In FORMS 3.0 item level UPDATEABLE property would do the trick.
>(We would set UPDATEABLE on CURSOR-ITEM to FALSE on
>WHEN-NEW-ITEM-INSTANCE trigger and set it back to TRUE on POST-TEXT-ITEM
>trigger.) When you set UPDATEABLE to FALSE, the cursor visits each item
>but won't let you type anything.
>

In Forms 3.0 this was actually a bug; it wasn't documented as working this way in NEW records, only QUERY records.

Forms 4 and 4.5 have a new item property INSERT_ALLOWED. This is settable in the Designer and programmatically using Set_Item_Property. This property determines whether fields in NEW records can have values entered. The UPDATEABLE item property determines whether fields in QUERY records can have values entered.

Using Set_Item_Property('b.field', INSERT_ALLOWED, PROPERTY_FALSE) should solve your problem.

-- 
Tony Rothwell
Received on Wed Oct 23 1996 - 00:00:00 CEST

Original text of this message