Query Records in forms 6i [message #326378] |
Wed, 11 June 2008 05:04 |
blaxmi
Messages: 36 Registered: May 2008 Location: Hyderabad
|
Member |
|
|
Hi All,
I have a problem in querying the records.I placed a button for query and execute query.when query button is pressed the cursor will automatically go in to the header table code.i'll select the code thru LOV.when i press execute button the system is not giving the output.I don't know what to do.if anyone understand my problem please give the response.
Thanks in advance.
|
|
|
|
Re: Query Records in forms 6i [message #326537 is a reply to message #326484] |
Wed, 11 June 2008 23:13 |
blaxmi
Messages: 36 Registered: May 2008 Location: Hyderabad
|
Member |
|
|
Hi
For Query button i was written the code like this..
clear_form(No_validate);
go_block('ec_hdr');
:lab:= 'Enter Query Mode';
set_item_property('create',ENABLED,PROPERTY_FALSE);
set_item_property('equery',ENABLED,PROPERTY_TRUE);
set_item_property('query',ENABLED,PROPERTY_FALSE);
set_item_property('SAVE',ENABLED,PROPERTY_FALSE);
set_item_property('fst',ENABLED,PROPERTY_FALSE);
set_item_property('LAST',ENABLED,PROPERTY_FALSE);
set_item_property('NEXT',ENABLED,PROPERTY_FALSE);
set_item_property('PRV',ENABLED,PROPERTY_FALSE);
--Enter_query;
For Execute query button:
begin
if :lab= 'EnterQueryMode' then
go_block('ec_hdr');
execute_query;
end if;
IF (:system.mode = 'ENTER-QUERY') THEN
-- exit_form;
-- message('hello');
null;
else
set_item_property('fst',ENABLED,PROPERTY_TRUE);
set_item_property('LAST',ENABLED,PROPERTY_TRUE);
set_item_property('NEXT',ENABLED,PROPERTY_TRUE);
set_item_property('PRV',ENABLED,PROPERTY_TRUE);
set_item_property('create',ENABLED,PROPERTY_TRUE);
set_item_property('query',ENABLED,PROPERTY_TRUE);
set_item_property('equery',ENABLED,PROPERTY_FALSE);
set_item_property('DELREC',ENABLED,PROPERTY_TRUE);
set_item_property('SAVE',ENABLED,PROPERTY_TRUE);
end if;
exception
when others then
null;
end;
This is the code which i written in both the buttons. One thing is,it is a master-detail form.
Please give the suggession how to do it.
|
|
|
|
|
Re: Query Records in forms 6i [message #326584 is a reply to message #326567] |
Thu, 12 June 2008 01:07 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
You should really learn how to debug your code. Find a way to check which branches are taken in if-statements etc.
Take a good look at the value you assign to lab as compared to the value you check it against. (By the way, this is the reason people use constants!)
Why not use the form's internal variable to check if you are in enter-query mode?!
[Updated on: Thu, 12 June 2008 01:09] Report message to a moderator
|
|
|
|
Re: Query Records in forms 6i [message #327012 is a reply to message #326954] |
Fri, 13 June 2008 06:59 |
blaxmi
Messages: 36 Registered: May 2008 Location: Hyderabad
|
Member |
|
|
Thank u littlefoot....
I'll agree with your statement but the client needs separate buttons for all these things.......
Any way thank you for giving reply to me..
|
|
|