Home » Developer & Programmer » Forms » Search button or engine (Oracle 10g forms, widows XP)
Search button or engine [message #286810] Mon, 10 December 2007 03:03 Go to next message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
Hi friends,

I have one canvas on which I have two data block, on each data block I have one form so total no of forms are two , 1 is master form , 2nd is child form, both have child and parents relations with each other.
Spouse master form has 3 columns

S_no,
Group_name,
Name

And child has again two column.

Detail
Remarks.

To be noted that both forms are linked with each other .
now I want to create one find button. And if I want to search name column in the master table (for the name of any employee, to get his full detail) how I will search that,. I want that even I write any part of name, e.g. if name is Ahmed Faraz mohammed and I just write ahmed or faraz or mohammed anyone of them in the name column and pres find button, it should show me the records which are having this name. One by one. If I pres next , next button.


Regards
Hasnat
Re: Search button or engine [message #287531 is a reply to message #286810] Wed, 12 December 2007 09:29 Go to previous messageGo to next message
Gooras
Messages: 4
Registered: December 2007
Junior Member
Why don't you use:

1) Enter query
2) write %Ahmed%
3) Execute query

?

It's basic functionality of Oracle Forms...
Re: Search button or engine [message #287571 is a reply to message #287531] Wed, 12 December 2007 12:57 Go to previous messageGo to next message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
hi thanks for your reply but i know this , actulay i wanted to create one button for that purpose, as i have mentioned earlier.

anyhow thanks once again my friend.
Re: Search button or engine [message #287699 is a reply to message #287571] Thu, 13 December 2007 03:43 Go to previous messageGo to next message
Gooras
Messages: 4
Registered: December 2007
Junior Member
Hi again.

I don't know if I understand you, but...

Maybe programatically setting the WHERE clause on the block is that what you want? You write procedure assigned to the search button which will set the where clause on the master block, go to that block and execute query on that block...

Or I misunderstood your needs again Wink
Re: Search button or engine [message #287734 is a reply to message #286810] Thu, 13 December 2007 05:16 Go to previous messageGo to next message
timor
Messages: 12
Registered: December 2007
Location: egypt
Junior Member
Salam 3alikom
you can use set_block_property
the property default_where and
use like
suppose the field name is f_name
set_block_property('block_name','default_where','%'||:fname||'%'
and you can use any other field with him to search
thanks
Re: Search button or engine [message #288147 is a reply to message #287734] Sat, 15 December 2007 02:16 Go to previous messageGo to next message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
THANKS FOR YOUR REPLY BROTHER.

as u said i did the same but its not working. please correct me if i m wrong. undermentioned i did.

I have table employees(so block name is employees) field name is “first_name”

Then I created one button “Search” with (when_button_press) event.

Then wrote this coding in that as u mentioned.

set_block_property('EMPLOYEES','default_where','%'||:first_name||'%'


regards,


Re: Search button or engine [message #288359 is a reply to message #288147] Mon, 17 December 2007 04:16 Go to previous messageGo to next message
Gooras
Messages: 4
Registered: December 2007
Junior Member
Hi.

To my view your line of code should look like:

set_block_property('EMPLOYEES',default_where,'first_name like '||''''||'%'||:first_name||'%'||'''');

You could use function upper() too.

Regards
Re: Search button or engine [message #288372 is a reply to message #286810] Mon, 17 December 2007 04:55 Go to previous messageGo to next message
timor
Messages: 12
Registered: December 2007
Location: egypt
Junior Member
Dear
yes it is true but firstmake the button at a separate blockand
then add the statement at the when button pressed
go_block('employee');
set_block_property('employee',default_where,'%'||:first_name||'%');
execute_query;

and this will make you seach with any name you writebest regardsTimor
Re: Search button or engine [message #289137 is a reply to message #288372] Wed, 19 December 2007 19:04 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Also consider putting 'upper' around both the item name and argument.

David
Re: Search button or engine [message #289195 is a reply to message #288372] Thu, 20 December 2007 01:43 Go to previous message
hasnat_kh
Messages: 11
Registered: September 2007
Junior Member
worm thanks to all of u,

Regards
Previous Topic: Frm -47105 no image name specified &display error
Next Topic: Default format of sysdate in forms 6i
Goto Forum:
  


Current Time: Sun Dec 04 18:39:24 CST 2016

Total time taken to generate the page: 0.09688 seconds