SYSTEM.BLOCK_STATUS remains on Query [message #578061] |
Sat, 23 February 2013 19:00 |
|
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 |
|
Littlefoot
Messages: 21818 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).
|
|
|
|