Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disable update on record in multirecord block

3,195 views
Skip to first unread message

Paul de Jong

unread,
Nov 12, 2001, 7:34:27 AM11/12/01
to
Hello,

I hope anybody can help me out.
Is it possible to disable a record in Forms?
Because I want to make it possible that in a multi-record block under
a certain condition a record is not accessible or updateable.

Is there some syntax like: SET_RECORD_PROPERTY(GET_BLOCK_PROPERTY('MY
BLOCK',CURRENT_RECORD), 'MY BLOCK', updateable ,PROPERTY_FALSE);


Thank you in advance!

Sincerely,

Paul de Jong

Connor McDonald

unread,
Nov 12, 2001, 9:56:27 AM11/12/01
to Paul de Jong

Have a look at SET_ITEM_INSTANCE_PROPERTY - but I can't remember whether
"updateable" was a valid property for this built-in

hth
connor
--
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."

Joost Bataille

unread,
Nov 12, 2001, 9:50:22 AM11/12/01
to
"Paul de Jong" <pauld...@yahoo.com> wrote in message
news:f8250707.01111...@posting.google.com...

> I hope anybody can help me out.
> Is it possible to disable a record in Forms?
> Because I want to make it possible that in a multi-record block under
> a certain condition a record is not accessible or updateable.
>
> Is there some syntax like: SET_RECORD_PROPERTY(GET_BLOCK_PROPERTY('MY
> BLOCK',CURRENT_RECORD), 'MY BLOCK', updateable ,PROPERTY_FALSE);

I'd use the when_new_record_instance trigger, it fires when the input focus
changes from a record to another.
Since you only want to change the properties of a certain record - not of
all records in the block - you have to use the built-in
'set_item_instance_property' and not 'set_item_property' or
'set_block_property' to change the 'update_allowed' property.
Also you cannot modify the update_allowed property of a _record_ so you have
to set this property for all the _items_ in the record/block.
Have a look at the online help.

Hope this helps, regards, Joost

--
Joost Bataille
University of Amsterdam

Stephan Langer

unread,
Nov 12, 2001, 9:21:47 AM11/12/01
to
Hallo Paul,

you may use set_item_instance_property( .. , update_allowed,
property_false)
For the correct syntax look inside Forms online help.

hth
Stephan

Paul de Jong schrieb:

Paul de Jong

unread,
Nov 14, 2001, 3:22:29 AM11/14/01
to
pauld...@yahoo.com (Paul de Jong) wrote in message news:<f8250707.01111...@posting.google.com>...

Thanx everybody for your reply's!
But it hasn't solved my problems yet.
This is a part of the syntax I wrote:

rec_id := GET_BLOCK_PROPERTY('block',CURRENT_RECORD);
SET_ITEM_INSTANCE_PROPERTY(':block.item',rec_id, navigable, PROPERTY_FALSE);

Now I get an error message:
FRM-41045 Cannot find item: INVALID ID.

What am i doing wrong?

> Sincerely,
>
> Paul de Jong

Joost Bataille

unread,
Nov 14, 2001, 8:33:31 AM11/14/01
to
"Paul de Jong" <pauld...@yahoo.com> wrote in message
news:f8250707.01111...@posting.google.com...
> But it hasn't solved my problems yet.
> This is a part of the syntax I wrote:
>
> rec_id := GET_BLOCK_PROPERTY('block',CURRENT_RECORD);
> SET_ITEM_INSTANCE_PROPERTY(':block.item',rec_id, navigable,
PROPERTY_FALSE);
>
> Now I get an error message:
> FRM-41045 Cannot find item: INVALID ID.
>
> What am i doing wrong?
> > Paul de Jong
You can reference all items in your form with their name. Forms understands
these names but does it's own referencing with internal ID's. You can find
these ID's with the built-ins 'find_item', 'find_alert' etc. Check the docs.
If you don't use these ID's you can use the names and Forms looks up the
ID's every time it has to.
It seems Forms cannot find the ID of the specified item. I think this is
because you specify the name in lowercase. Try using uppercase like
rec_id := GET_BLOCK_PROPERTY('BLOCK',CURRENT_RECORD);
SET_ITEM_INSTANCE_PROPERTY('BLOCK.ITEM',rec_id, navigable, PROPERTY_FALSE);

and don't use the colon in the character string ':block.item'

Good luck!

Stephan Langer

unread,
Nov 14, 2001, 6:37:31 AM11/14/01
to
Hallo Paul,

remove the ':' before the block-name

SET_ITEM_INSTANCE_PROPERTY('block.item',rec_id, navigable, PROPERTY_FALSE);


hth Stephan

Paul de Jong schrieb:

> pauld...@yahoo.com (Paul de Jong) wrote in message news:<f8250707.01111...@posting.google.com>...

--
Mit freundlichen Gr館en

Stephan Langer,
QITS GmbH


0 new messages