Issue with Mandatory Field in Custom Form [message #501525] |
Tue, 29 March 2011 12:26 |
|
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 |
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 #501622 is a reply to message #501604] |
Wed, 30 March 2011 03:21 |
|
Littlefoot
Messages: 21823 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 |
|
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!
|
|
|