Help :Unable to update or refresh a field in master block when deleting detail record (merged) [message #206841] |
Fri, 01 December 2006 13:34 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
michaelv
Messages: 20 Registered: November 2006 Location: rockville, MD
|
Junior Member |
|
|
Hi,
I am new to the forum and i have a question relating to Oracle form and i hope someone can help. Here is the scenario:
I have form which has a master block and a detail block. THey both display multiple record at the same time.
When i delete a detail record which has one field value matches to one field in master block , i can't refresh the matching field. In detail block, i use trigger when-remove-record to do this, but i can't navigate to the master block from this trigger.
Let me give you an example:
Master block has
Field1 Field2
1 2
In detail block:
Field1 Mem1 Mem1
1 a1 1
1 b1 2
Now, when i delete a detail record in red, I would like the master record looks like this at runtime
Field1 Field2
1
Since Field2 has value of 2 which matches to Mem1 (value of 2). So after delete , Field2 will be set to NULL.
Thanks very much.
|
|
|
|
Re: Help :Unable to update or refresh a field in master block when deleting detail record [message #207186 is a reply to message #207039] |
Mon, 04 December 2006 09:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
michaelv
Messages: 20 Registered: November 2006 Location: rockville, MD
|
Junior Member |
|
|
Thanks, djmartin.
It clears out the field , no matter field2 matches to Mem1 or not. Since i can navigate out of the detail record when in query mode, i can't check for the match before decode the value.
Also, when i use the mouse to go to the master record, there is a popup message asking to save record. If i click OK, then it saves to db , but if i click CANCEL, then the Field2 does not rollback the original value. Is there a way to prevent this?
[Updated on: Mon, 04 December 2006 09:41] Report message to a moderator
|
|
|
|
How to remove warning message "Do you want to save the change you have made" [message #207227 is a reply to message #206841] |
Mon, 04 December 2006 14:51 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
michaelv
Messages: 20 Registered: November 2006 Location: rockville, MD
|
Junior Member |
|
|
Hi,
I have searched through the forum but couldn't find the answer for my problem.
Here is the scenario: i have a form with a master block and a detail block. Both block display multiple records at the same time.
When i delete a detail record, i move mouse the the master record where there is a match between the master and the detail, then from there i move mouse to any master record, i receive the message " Do you want to save the change you have made"
I put the "POST" in when-new-record-instance in master block.
I hope someone could help me to get a way with this message. I have tried different way as suggested from other posts, but no luck.
thanks a lot.
Michael.
|
|
|
|
Re: How to remove warning message "Do you want to save the change you have made" [message #207249 is a reply to message #207227] |
Mon, 04 December 2006 19:18 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Please don't start new threads on the same topic.
Put the 'post' in a 'post-' trigger, like 'post-block' on the 'detail' block or maybe in the 'pre-query' of the 'master' block but you will have to test whether this works. The 'post' has to be done before you have moved on to the code that will do the 'execute_query'.
David
|
|
|