I have problem related to validation. I have implemented forms calendar in one of my form to insert date in a text item. next to that item i have a button which invokes the calender please note that text item property required=yes
button properties mouse navigation=no keyboard navigation=no
when i insert new record and focus comes to that text item i press calender button to pick a date. when-vlidate-trigger failed message is displayed which is caused by validation trigger on that item.
I removed that trigger which worked but I can not remove this trigger as there is more code which check date intervals etc.
I copied the same code to pre-commit and when-validate-record by doing so i was able to invoke calender but in query mode on update if validation fails then to correct that value i am again unable to invoke calender due to validation trigger on any level.
Please get me out of this issue
If you set the properties of the button so that it is non-mouse navigable and non-keyboad navigable, it will mean that you can still click on it and run the button's pl/sql triggers, but it will not involve any field or block navigation. This should reduce the chance of the triggers you mention being fired. If the properties I listed are set to yes, then when you click on the button you may well navigate away to a different block.
I have mentioned that button is not mouse nor keyboard navigable, but i think it just escape check for null caused by required property set yes: i have applied some check also which find difference with dates if difference is less then X then form failure.
I would go another approach:
Transfer your calendar-objects into a separate form.
In the functionaliy which shows the calendar, instead of doing a GO_BLOCK to your calendar-block, do a CALL_FORM to your new calendar-fom. This will not invoke any validation. To transfer values between your form and the calendar-form, this might help: http://andreas.weiden.orcl.over-blog.de/article-28180655.html
Thank you all
I got this solution
1. i set forms validation scope to form level then call the calender invoking procedure after that procedure i re-changed form validation scope to item level By
SET_FORM_PROPERTY(:SYSTEM.CURRENT_FORM, VALIDATION_UNIT, FORM_SCOPE);
SET_FORM_PROPERTY(:SYSTEM.CURRENT_FORM, VALIDATION_UNIT, ITEM_SCOPE);
It work nicely with my requirements.