Problem with GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM, ITEM_IS_VALID) [message #360465] |
Fri, 21 November 2008 02:14 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
irvs79
Messages: 7 Registered: April 2008
|
Junior Member |
|
|
Hello to all,
I am currently having a problem with GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM, ITEM_IS_VALID) function. This function is being called to validate the current item where the cursor is located just before closing the form. When the user chooses Exit option from a menu item, it is invoking a procedure that uses the said function. The problem here is that the function is returning 'FALSE', which means the item's value is invalid where in fact the value is actually valid. As a result, the user is not able to exit the form.
I have checked the triggers on item level and I did not find anything that would cause the said problem. I made a layout on how the process is being done:
A user chooses Exit option from the menu and KEY-EXIT trigger is being fired.
FORM LEVEL TRIGGER: KEY-EXIT
BEGIN
PACKAGE_A.VALIDATE_ITEM;
COMMIT_FORM;
EXIT_FORM;
END;
PACKAGE_A.VALIDATE_ITEM
BEGIN
IF GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM, ITEM_IS_VALID)
= 'FALSE' THEN
BELL;
MESSAGE('Input item is invalid. Exit form failed.');
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
Since GET_ITEM_PROPERTY function is returning 'FALSE', the package procedure is raising a form trigger failure and will not continue to exit the form. Given the said situation, I tried playing around with the screen during run time. On first attempt, I put the cursor focus to ITEM1. As expected, I was not able to exit the form. After the message occured, I transferred the cursor to the next item. Afterwhich, I shifted the cursor back to ITEM1 and selected the same Exit option from the menu. To my surprise, the form actually closed and I was able to exit the module. I did the same steps again to verify the pattern. I do not understand why this is happening when in fact, they are all going through the same procedures and functions. Both items have the same data types and values. Actually, they both have Null values.
Do you have any idea why this is happening? Your help will be very much appreciated.
Thank you very much,
Irvin
|
|
|
|