Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i force the form to repaint/refresh when adding records

Status
Not open for further replies.

bookouri

IS-IT--Management
Feb 23, 2000
1,464
US
I have a 6i form running through 9ias. When I add a new record, I do a select nextval from a sequence to populate the primary key. Normally this key is hidden from users. But, for a new application Im working on, the user wants to use the primary key number for some tracking process. When a new record is added the primary key number is generated and stored in the record but it is not displayed on the form until the next time the record is queried. How can I a "refresh" so the user adding the new record can see the primary key value immediately?

Ive tried every form level and data block trigger I can think of and I cant get the form to display that primary key to the user.

any suggestions would be appreciated...

 
What trigger have you put the code in to get the nextval?
 
Its in a before_each_row trigger on the table...
 
yes, in a before each row trigger...
 
So the form does not actually get the next value, but a database trigger does.... So you will not be able to see the value until after you have created the record, and then after the record is re-queried.

To get the form to see the new value you should use a form pre-insert trigger instead.
 
That's what i was afraid of....<G>

i was just hoping to put as much into the table as possible so i wouldnt have to program that behavior into every form..

thanks again..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top