Home » Developer & Programmer » Forms » Issue with Mandatory Field in Custom Form (Oracle Forms version 6i)
Issue with Mandatory Field in Custom Form [message #501525] Tue, 29 March 2011 12:26 Go to next message
guptasum
Messages: 14
Registered: March 2011
Junior Member
Hello,

I developed a custom Form using Form Builder 6i. This Form has selection criteria (data to be entered in a couple of fields) and a "Find" Button, which queries the data (based on the selection criteria) and populates all fields on the Form.

This Form has a couple of "Required" fields in its search criteria section. When data is not populated in any of the Required fields and "Find" button is clicked upon, Form raises an exception and pops up a message indicating the user 'to enter data in mandatory fields'. However, this message keeps popping up and would not stop.

So, I'm not able to proceed with querying data on my custom Form. I had to kill the session and reconnect to front end to overcome this issue. It would be great if anyone can help me in overcoming this issue.

Thanks!
Re: Issue with Mandatory Field in Custom Form [message #501527 is a reply to message #501525] Tue, 29 March 2011 13:13 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
I really do not know what you were saying, but you cannot use database fields to do a query unless you have either hit the enter-query keystroke or run a trigger enter-query BEFORE you put any search criteria.

Unless...you do what I do. You make non-database fields where users enter data to be searched and when they hit the SEARCH button, you run a user-created trigger to build a where clause based on the columns equaling the non-database fields.

Unless I just did not understand what you were saying.
Re: Issue with Mandatory Field in Custom Form [message #501556 is a reply to message #501527] Tue, 29 March 2011 21:36 Go to previous messageGo to next message
guptasum
Messages: 14
Registered: March 2011
Junior Member
Hi,

Yes your understanding is correct. I'm making use of non-database fields as selection criteria fields. Users enter data into those fields (using LOVs). Later I use data in those fields in my queries and populate the Form with complete data.

Scenario here is that there are a few mandatory and a few non-mandatory fields in the search criteria. When user does not enter data in the mandatory (Required) field, the issue comes up. Issue is as explained in my previous post

When data is not populated in any of the Required fields and "Find" button is clicked upon, Form raises an exception and pops up a message indicating the user 'to enter data in mandatory fields'. However, this message keeps popping up and would not stop.

So, I'm not able to proceed with querying data on my custom Form. I had to kill the session and reconnect to front end to overcome this issue. It would be great if anyone can help me in overcoming this issue.


Thanks!
Re: Issue with Mandatory Field in Custom Form [message #501582 is a reply to message #501556] Wed, 30 March 2011 00:58 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What does "Find" button do? Could you post its code?
Re: Issue with Mandatory Field in Custom Form [message #501604 is a reply to message #501582] Wed, 30 March 2011 01:41 Go to previous messageGo to next message
guptasum
Messages: 14
Registered: March 2011
Junior Member
"Find" button just executes the query. But, as the field is mandatory, inbuilt functionality of the 'Form' is raising the exception and popping up the message. Is there any way that we can control this popping up of message once and then stop popping up?

Currently, that message is never stopping to pop up. I had to kill the session and re-connect to overcome this issue.

Its a little urgent for me to resolve it now. Appreciate your help in this regard.
Re: Issue with Mandatory Field in Custom Form [message #501622 is a reply to message #501604] Wed, 30 March 2011 03:21 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, you could remove the "Required" property and check whether all mandatory values have been entered at the beginning of the "Find" button, such as
-- WHEN-BUTTON-PRESSED on the "Find" button

if :blk.first_mandatory_item is null or 
   :blk.second_mandatory_item is null or ...
then
   message('Not all mandatory items have been entered');
   raise form_trigger_failure;
else
   go_block('data_block');
   do_something_else_if_necessary;

   execute_query;
end if;

[Updated on: Wed, 30 March 2011 03:21]

Report message to a moderator

Re: Issue with Mandatory Field in Custom Form [message #501673 is a reply to message #501622] Wed, 30 March 2011 09:10 Go to previous message
guptasum
Messages: 14
Registered: March 2011
Junior Member
Hello,
Thanks very much for that workaround. Would definitely implement that to overcome the issue. I actually had the same validation initially by not marking the field as "Required", however, making it mandatory with validation through the script.

For building a user friendly interface, I had to go for making the field "Required" and highlight it accordingly as soon as the user logs into the Form.

It would be great if anyone can help me overcoming the specified issue (mentioned below in italics).

When data is not populated in any of the Required fields and "Find" button is clicked upon, Form raises an exception and pops up a message indicating the user 'to enter data in mandatory fields'. However, this message keeps popping up and would not stop.

So, I'm not able to proceed with querying data on my custom Form. I had to kill the session and reconnect to front end to overcome this issue. It would be great if anyone can help me in overcoming this issue.


Thanks a ton once again!
Previous Topic: Stacked canvas on Tab Canvas
Next Topic: Reg Csv file
Goto Forum:
  


Current Time: Wed Sep 18 20:06:21 CDT 2024