Home » Developer & Programmer » Forms » Calendar Control (Forms 6i)
Calendar Control [message #309844] Sat, 29 March 2008 03:46 Go to next message
dillango
Messages: 145
Registered: January 2008
Senior Member
Dear All,

I have attached calendar control for my date field where I have the following code in
"When-validate-item" trigger.

If :fromdate is null then
message('Date cannot be blank');
raise form_trigger_Failure;
end if;

Now the problem is, when I click the calendar (pushbutton), the above trigger is firing and I am not able
to open the calendar control. However, If I remove the abvoe trigger, I could able to open the caldenar.

I need the cursor should be positioned in that colum (It is first colum of the form ). And, if the user desire
to view the calendar, can click the button and choose the date or he can type the date manually.

Any suggestion please?

Ilango
Re: Calendar Control [message #309949 is a reply to message #309844] Sun, 30 March 2008 08:38 Go to previous messageGo to next message
dillango
Messages: 145
Registered: January 2008
Senior Member
Dear All,

Can anybody have the solution for the above problem?

Ilango
Re: Calendar Control [message #310014 is a reply to message #309949] Sun, 30 March 2008 23:46 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Instead of testing to see if the item is empty, try making the item mandatory.

David
Re: Calendar Control [message #310078 is a reply to message #310014] Mon, 31 March 2008 03:42 Go to previous messageGo to next message
dillango
Messages: 145
Registered: January 2008
Senior Member
Thanks Mr.David.

It is same effect. I set the property "Required" as "Yes" but when I click the calendar button, I am getting an error "Frm-40202 Field must be entered".

If I check the validation in "key-next-item" trigger instead of "When-validate", It is working fine both calendar as well validation but if the user leaves the field by using "mouse", validation will not effect.

Ilango
Re: Calendar Control [message #310292 is a reply to message #310078] Mon, 31 March 2008 19:31 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Okay. So what you have found is that although you want to validate the 'date' field, you are actually navigating to a button that is sitting beside it in your attempt to populate it. That is, you are leaving the field before populating it.

Try changing the order of the two fields so that you navigate to the button BEFORE you navigate to the date item.

Try making the button non-navigable to both the keyboard and mouse and see what happens.

Alternatively, define the date item as non-mandatory but set it to mandatory in the 'when-button-pressed' trigger. You could also do your validation at the record level. Also test the behaviour when using 'post-text-item'.

David
Re: Calendar Control [message #310527 is a reply to message #310292] Tue, 01 April 2008 08:59 Go to previous messageGo to next message
dillango
Messages: 145
Registered: January 2008
Senior Member
Thank you Mr.David.

The second idea working perfectly. ie. I validate the date field at record level.

Thank you once again.

ILANGO
Re: Calendar Control [message #310544 is a reply to message #309844] Tue, 01 April 2008 10:09 Go to previous messageGo to next message
Kaeluan
Messages: 179
Registered: May 2005
Location: Montreal, Quebec
Senior Member
Here is another setting you can try,

In form builder at the module level, there is a property called "Defer Required Enforcement" that if you set to "Yes", will validate your field required status only at record level automaticaly. This will allow you to navigate without getting prompted for Required field.
Re: Calendar Control [message #310558 is a reply to message #310544] Tue, 01 April 2008 11:25 Go to previous message
dillango
Messages: 145
Registered: January 2008
Senior Member
Thank you for your suggestion.

But the thing is, I am moving the focus depends on the input given to each field. I suppose get the result in field level itself.

Regards, ILANGO
Previous Topic: Zooming an image
Next Topic: dbms packages
Goto Forum:
  


Current Time: Fri Dec 02 14:35:31 CST 2016

Total time taken to generate the page: 0.22463 seconds