This content has been marked as final. Show 4 replies
Veena wrote:I will not talk with your code or where you want to use it. concentrate only on the main issue.
I have a scenario where i need to display an alert while closing/saving an oracle 10g custom form when the column has some value. And for other values of data the alert should not be displayed.
I have written code to achieve this in key-commit and key-exit triggers.
But the issue is, the alert is firing when the mouse is on the required record and when i click on save/close the form. But the alert is not firing when he mouse is on the other data values.
you can make a summary column base on the column with count summary type. and use this value in the condition for your goal.
Hope this helps
Veena wrote:Ok. Think you are talking about Column ABC. If there is any value in ABC then aleart show show.
Can you please elaborate on this. I could not get any idea.
I idea is take a summary column, where sum type is count and it will count the record value of ABC. you don't think of where the cursor is.
write your code with the summary column value condition.
Hope it's clear.
Is this code for comparing the value in form and db really needed?
I mean, I am assuming that when the form is opened then it displays the data queried from db and on key-commit and key-exit you are comparing the current values in form fields with the values in db. Then, if they don't match, you are showing an alert.
So, it can be achieved in a rather simpler way..
IF :SYSTEM.FORM_STATUS = 'CHANGED' -- Form status will include any change made in the form. You can use lock status or record status as per your need.
<< show alert code>>
Hope, this is what you are looking for.