Any problem with MESSAGE_CODE in FORMS 5.0 ??

From: Kiran Anumolu <anumolu_kiran_at_hotmail.com>
Date: Tue, 25 Jan 2000 14:12:52 -0600
Message-ID: <388E03C3.24F6EC19_at_hotmail.com>



I am trying to use MESSAGE_CODE and based on the value I am trying to perform different things.

For eg:
I have a simple form with 2 text fields (fname and lname) and 2 buttons 'Retrieve' and 'Close'.

I have the following code in the 'Retrieve' button

if (:system.form_status = 'ENTER-QUERY') then

   execute_query;
end if;

[Quoted] if MESSAGE_CODE = 40301 then

   message('Query retrieved No results.')    go_item(Block_name.fname);
else
  go_item(Block_name.lname);

Now, If there is no data pertaining to a query then MESSAGE_CODE is set to 40301 and the code works fine. Then if I try to retrieve proper data which
exists then execute_query works fine but the MESSAGE_CODE is not reset to 0
it is still 40301 and so the else part is not being executed and always the
if part is being executed.

Did any one encountered the same problem? Is this a bug with MESSAGE_CODE?
Or I am missing something here?

Thanks.

--kiran
  anumolu_kiran_at_hotmail.com Received on Tue Jan 25 2000 - 21:12:52 CET

Original text of this message