How are you querying the record after the form update? It's been years since I've messed with forms but I'm thinking it might be a simple commit issue.
Main Topics
Browse All TopicsI have a block in an Oracle custom form. The block is linked to a view, not a table. On the block, I create a button for when-button-pressed trigger. In this trigger, when user presses it, it will update a record in a table. This table is one of tables for the view. The problem is when I press the button, it seems go through because I set a message at the end of the code and the message popped up. However, when I query this record, the table's record is not updated. I don't know why?
Any ideas? I am using Oracle 8i database and application 11.0.30
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
yes, you are right. it's missing a commit statement.
Now there is still one more problem. After I hit the button, I don't see the change populated on the block xx_downloads_v, and I have to requery id to see the change.
I ever put the following code at the end
...
end;
message('OK, this download has been inactivated.');
go_block('xx_downloads_v')
execute_query;
But, it doesn't work. After I hit the button, the form's data becomes different and pick up another id's record.
How to fix it?
After I added the following code
:parameter.G_query_find := 'TRUE';
app_find.find('XX_DOWNLOAD
:parameter.G_query_find := 'FALSE';
rather than
go_block (xx_downloads_v);
execute_query;
it seems working. But I don;t understand. Can you explain?
I have another related question. I just added 50 points for this question from 125. I want to display active and inactive for the front end form. So far it will display as A as active and I as Inactive. How do I format the output for this purpose. The following code I wrote and I put them under post-query trigger but it doesn't work. How to fix? and which trigger I should put into?
declare
--v_ative varchar2(30);
--v_inative varchar2(30);
v_attrib varchar2(30);
begin
--v_ative = 'Active';
--v_inative ='Inactive';
if :xx_downloads_v.download_s
v_attrib := 'Active';
elsif :xx_downloads_v.download_s
v_attrib := 'Inactive';
end if;
--SET_ITEM_PROPERTY('xx_do
end;
To your 1.question - in this application the execute_query is done by procedure app_find.find('XX_DOWNLOAD
2. If you want to display text "Active" instead of A and "Inactive" instead of I then
EITHER
1. you have to create an item (:xx_downloads_v.status_te
begin
if :xx_downloads_v.download_s
:xx_downloads_v.status_tex
elsif :xx_downloads_v.download_s
:xx_downloads_v.status_tex
end if;
end;
This statement is for changing visual attribute of item and not for changing its value:
SET_ITEM_PROPERTY('xx_down
OR
2. you can change size of item xx_downloads_v.download_st
decode(<<existing_column>>,'A'
I think that it is better for you to use option 1., because usage of 2.option can tend to side effect.
Business Accounts
Answer for Membership
by: wasabi3689Posted on 2009-09-30 at 15:30:43ID: 25464284
attached is my code for the trigger. I ever assigned a id to xd.download_id = 549801 directly. But, it still doesn't work to update this record.
Select allOpen in new window