Home » Developer & Programmer » Forms » SYSTEM.BLOCK_STATUS remains on Query (Oracle FORMS 11G)
SYSTEM.BLOCK_STATUS remains on Query [message #578061] Sat, 23 February 2013 19:00 Go to next message
metal_navin
Messages: 21
Registered: February 2013
Junior Member
Good day members.
I have an issue with an oracle form that is being deployed via the web.

The form is used to insert new customers into a table on the database, but also, it is used to QUERY the table, by using a customer_id entered by the user to see the details for a customer.

The scenario is that for a particular field on the table, CUSTOMER_ID, I want to conceal the data on this field ONLY when I do a QUERY.
I got this to work by using the below in the POST-QUERY trigger on the block.
IF :SYSTEM.BLOCK_STATUS = 'QUERY' THEN
 SET_ITEM_PROPERTY('CUSTOMER_ID',CONCEAL_DATA,PROPERTY_TRUE); 
END IF;


However, after I do a QUERY, and I decide to INSERT a NEW customer into the table, I click on the button to do a NEW insert into the database, and when typing in the CUSTOMER_ID, it is still concealed and I cannot see what I am typing.

This shouldn't happen as I only want the data to be hidden/concealed when doing a query, but I do want to see the data I am typing into the field when I am doing a new Insert.

Can anyone please guide me with this frustrating error?

Much appreciation,
Navin
Re: SYSTEM.BLOCK_STATUS remains on Query [message #578070 is a reply to message #578061] Sun, 24 February 2013 02:50 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to add ELSE to your code, i.e.
IF :SYSTEM.BLOCK_STATUS = 'QUERY' THEN
   SET_ITEM_PROPERTY('CUSTOMER_ID',CONCEAL_DATA,PROPERTY_TRUE); 
ELSE
   SET_ITEM_PROPERTY('CUSTOMER_ID',CONCEAL_DATA,PROPERTY_FALSE);    
END IF;

Because, once you concealed that item's value, you never reset it so it remained in the concealed status "forever", i.e. until you set it to FALSE (or exit / re-enter the form).
Re: SYSTEM.BLOCK_STATUS remains on Query [message #578095 is a reply to message #578070] Sun, 24 February 2013 07:57 Go to previous message
metal_navin
Messages: 21
Registered: February 2013
Junior Member
Ok I used the code you suggested, but it worked in the WHEN-NEW-RECORD-INSTANCE trigger instead of the POST-QUERY.

Thanks alot for pointing me in the right direction!

Navin
Previous Topic: check box in oracle forms
Next Topic: Bypass login with Oracle database
Goto Forum:
  


Current Time: Wed Apr 24 08:42:52 CDT 2024