Home » Developer & Programmer » Forms » Search system
Search system [message #118842] Mon, 09 May 2005 04:09 Go to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

Hello,
I am trying to create a search system similar to the formbuilder's help (or even the windows help).

I want to search through a list of customers' names.
When i type the first few characters of the name to be searched, all those names matching(partially/fully) the input must be displayed simultaneously as the input is being made.

I tried LOVs, but the problem is that i have to press ENTER to validate the input and also the search result is not simultaneous.
Can anyone help solving this problem?

Re: Search system [message #118864 is a reply to message #118842] Mon, 09 May 2005 07:42 Go to previous messageGo to next message
fahedakhter
Messages: 39
Registered: March 2005
Location: Pakistan
Member

Use this code in WHEN-VALIDATE-ITEM
set_block_property('emp',default_where,'ename like'||chr(39)||:a||'%'||chr(39));
execute_query;
set_block_property('emp',default_where,'');

Regard's
Re: Search system [message #119277 is a reply to message #118864] Wed, 11 May 2005 10:18 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

fahedakhter,
i have tried the code u gave in the forms trigger:when-validate-item, however, it does not seem to work properly.
Its the same as it was without including the trigger.
Re: Search system [message #119335 is a reply to message #118842] Wed, 11 May 2005 21:10 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Lets go back to the LOV.

Do you want one or more than one lines displayed in the block, not the LOV but the block after the user is finished in the LOV.

David
Re: Search system [message #119432 is a reply to message #119335] Thu, 12 May 2005 09:41 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

djmartin,
in the lov, when the user types a string, i want a list of all elements to be displayed matching the input as it is being made.
Just like the windows help.
suppose i type prin , all elements matching PRIN partially will be display as i am typing.
Re: Search system [message #119501 is a reply to message #118842] Thu, 12 May 2005 19:49 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
The behavious that you describe is the default behaviour of an LOV.

Make sure that you have 'filter before display = NO' and, initially, that 'autmatic select = NO'.

Tell me what 'functional' settings you have for your LOV. Do you use the default LOV key to pop it up or do you use the show_lov command?

David
Re: Search system [message #119641 is a reply to message #119501] Fri, 13 May 2005 10:54 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

Djmartin,
the default behaviour responds only when the user presses enter to validate the initial input.
See, suppose I type BA and invoke the LOV, all elements starting with BA will be displayed. This is ok.
However, What i want is to:
Display the nearest match in the text_item box when i am typing.
Again i am repeating: the system must match what i am typing REAL-TIME and display the matching element as i am typing the string.
Default LOV requires that i press ENTER each time i input a new string. I dont want this.
In the "MS Explorer help" picture, you can see that when i type PRIN, all corresponding elements are displayed WITHOUT ME PRESSING ENTER.
Just try it and you will understant what i want.
img]/forum/fa/150/0/[/img]
Re: Search system [message #119643 is a reply to message #119501] Fri, 13 May 2005 10:56 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

Or in the excel sheet sample, the doc contains a list of values.
When i type the button "N", excel automatically fills the cell with the value already found in the list of values and the user just has to confirm it by pressing enter.
/forum/fa/151/0/
Re: Search system [message #119665 is a reply to message #119643] Fri, 13 May 2005 12:29 Go to previous messageGo to next message
venkatesham
Messages: 45
Registered: April 2005
Location: Hyd
Member


Hi,
Can u tell the Process How u Developed this form....as i am new to forms...

Venkat..
Re: Search system [message #119741 is a reply to message #119665] Sat, 14 May 2005 09:33 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

Which form are you talking about?
Am actually developing a stock control system with multiple forms involved.
Re: Search system [message #119802 is a reply to message #119641] Sun, 15 May 2005 20:58 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
For real time display you need a real time system, or run a real time object. You can use VB or Java to simulate what Windows does in Help and Excel. Forms is not a real time application. Imagine the network traffic between the PC and Application Server if it was real time.

To save your users that extra keystroke (and I have users who also want to save it), and to 'simulate' what you have in mind, create an LOV pop-up that is very similar in size and colour to your data field, position that pop-up 'over' your data field', use 'automatic display' to bring it up, and get them to enter into it. They can either 'enter' or 'tab' to the next field or you can use 'automatic select' to populate the field when the 'only one' is found. But be careful with this last option, it sounds good but if the users do data entry 'head down', when they look up they may see that the 'unnecesary' keystrokes are now in the next field. You could sound a bell when leaving the 'LOV'ed field to tell tehm that if is 'full'.

David

If I have not been clear enough in my description please let me know.
Re: Search system [message #119979 is a reply to message #119802] Tue, 17 May 2005 02:12 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

Thank you David,
I had already tried that.
It works very well (viz the automatic select and LOV attached to the item's property). However, i still want to save that extra keystoke.
I will try to implement it in activex or java.
By the way, do you know how to do it in activex or java?
Re: Search system [message #119981 is a reply to message #119979] Tue, 17 May 2005 02:19 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What extra keystroke? Auto-popup (no keystroke), exit field (always have to do it). Where is the extra key-stroke?

Sorry, no idea about the 'active' VB or Java. Try googling it. Also look in the OTN Forms examples.

David
Re: Search system [message #119985 is a reply to message #119981] Tue, 17 May 2005 02:25 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

Extra keystroke refers to the ENTER button.
Everytime i have to press ENTER to validate a NEW search string.
It ok with LOV...but i still want the style of windows help.
Re: Search system [message #119988 is a reply to message #119985] Tue, 17 May 2005 02:33 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Sorry, I didn't mean to be obtuse.

I know you WANT to do it like the real-time applications, but in terms of field-mode keystrokes I can't see where the extra ENTER key comes from if you use the auto pop-up LOV versus a real-time field. You still have to get into it and you still have to get out of it. Where/when do you see the extra ENTER.

David
Re: Search system [message #119990 is a reply to message #118842] Tue, 17 May 2005 02:36 Go to previous messageGo to next message
Neecharl
Messages: 15
Registered: May 2005
Location: Chennai/Mauritius
Junior Member

Its getting too complicated dude.
forget the LOV.
I will try your activex/java suggestion and get back to u.
Re: Search system [message #119994 is a reply to message #119990] Tue, 17 May 2005 02:40 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Cool. I'll ask around.
Previous Topic: Page Not Found (Running Form)
Next Topic: sending data from form to excel and excel to form
Goto Forum:
  


Current Time: Thu Sep 19 18:57:32 CDT 2024