How to disable a block on form intiation and to enable the same on button click in oracle forms

lakshganga picture lakshganga · Dec 6, 2013 · Viewed 16.8k times · Source

I am new to oracle forms. I want to disable a data block on form initiation and to enable the same on button click.

I wrote 2 triggers

1. "when_new_form_instance"
SET_BLOCK_PROPERTY('ADD_STUDENT',enable,PROPERTY_FALSE);
2."when_button_pressed"
SET_BLOCK_PROPERTY('ADD_STUDENT',enable,PROPERTY_TRUE);
Its throwing some error that "no such property for SET_BLOCK_PROPERTY"



Help would be much appreciated!

Answer

nightfox79 picture nightfox79 · Dec 7, 2013

You can't disable a block. You have 2 options:

  1. If it is on a tabpage put the enable, of visible property of the tabpage to false.
  2. Put the following propertys to false: insert_allowed, update_allowed, delete_allowed, query_allowed. After that you can't do anything in the block.