Home » Developer & Programmer » Forms » Capture Key press in Oracle Forms (Oracle Forms, 6i, Winodws XP Professional)
Capture Key press in Oracle Forms [message #460696] Mon, 14 June 2010 04:36 Go to next message
mary.yujin
Messages: 26
Registered: June 2010
Junior Member
Hi All,

Please advise me how to capture key press in oracle forms 6i.My intention is to create a form with 2 blocks. First block have one text item which user will input data and second block displays data based on the value typing in the text item(Same like LOV).

Mary Yujin
Re: Capture Key press in Oracle Forms [message #460705 is a reply to message #460696] Mon, 14 June 2010 04:52 Go to previous messageGo to next message
Littlefoot
Messages: 21817
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why wouldn't you use Forms built-in querying machine? You'd need only one block. "Text item" is, I guess, one of the detail items as well. Create a List of Value on that item. Perform query.
Re: Capture Key press in Oracle Forms [message #460708 is a reply to message #460705] Mon, 14 June 2010 05:04 Go to previous messageGo to next message
mary.yujin
Messages: 26
Registered: June 2010
Junior Member
Thanks,

But actualy my second blocks displays all the data in alphabetical order. Still it is very difficult to search a particular record as the block displays more than 500 records.

[Updated on: Mon, 14 June 2010 05:09]

Report message to a moderator

Re: Capture Key press in Oracle Forms [message #460717 is a reply to message #460708] Mon, 14 June 2010 05:09 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
m4yujin wrote on Mon, 14 June 2010 11:04
Thanks,

But actualy my second blocks displays all the data in alphabetical order.

I really can't see why that's a problem.

m4yujin wrote on Mon, 14 June 2010 11:04

Still it is very difficult to search a particular record as the block displays more than 500 records.

Do you understand how oracle's search functionality works?
If you use enter-query mode and enter search criteria you will only get back as many records as match that criteria.

m4yujin wrote on Mon, 14 June 2010 11:04
I have attached excel sheet.

Where?
Re: Capture Key press in Oracle Forms [message #460721 is a reply to message #460717] Mon, 14 June 2010 05:14 Go to previous messageGo to next message
mary.yujin
Messages: 26
Registered: June 2010
Junior Member
Please find attached file. so that my idea will be more clear
  • Attachment: sample.JPG
    (Size: 81.29KB, Downloaded 1684 times)
Re: Capture Key press in Oracle Forms [message #460724 is a reply to message #460721] Mon, 14 June 2010 05:17 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
So you want to search on name?
Create a single block.
Run form.
Go into enter-query mode.
Type Ba in name field.
Execute query.
See what happens.
Re: Capture Key press in Oracle Forms [message #460728 is a reply to message #460724] Mon, 14 June 2010 05:25 Go to previous messageGo to next message
mary.yujin
Messages: 26
Registered: June 2010
Junior Member
Yes,
But thing is that user dont want to click/press on any key before or after typing the name in upper block.While typing name in text item in upper block itself, automatically the below block should display data starting with name mentioned in upper text item and user will put tick mark against the name they want.

Thanks in advance.
Re: Capture Key press in Oracle Forms [message #460729 is a reply to message #460728] Mon, 14 June 2010 05:28 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
Forms doesn't work that way.
Re: Capture Key press in Oracle Forms [message #460737 is a reply to message #460729] Mon, 14 June 2010 05:50 Go to previous messageGo to next message
mary.yujin
Messages: 26
Registered: June 2010
Junior Member
Can we modify LOV screen by including any control.

Thanks in advance
Re: Capture Key press in Oracle Forms [message #460752 is a reply to message #460737] Mon, 14 June 2010 06:24 Go to previous messageGo to next message
Littlefoot
Messages: 21817
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
A form, itself, is unaware that someone is typing characters into an item, until you navigate out of that item. Then the WHEN-VALIDATE-ITEM or POST-TEXT-ITEM triggers fire (if they exist) (perhaps some other triggers too).

If you know Java, you could try to implement solution that includes both Forms and Java (I don't know how to do that).

Or, you could use another tool (different from Oracle Forms).

Or, if you still want Forms, there is a way to "simulate" your requirement (not entirely, but close enough).
When user enters "Ba" into the search item, he/she will have to press <Tab> or <Enter> which will fire KEY-NEXT-ITEM trigger.
In that trigger, you'd have to modify details block property by using the SET_BLOCK_PROPERTY built-in. It should set ONETIME_WHERE clause so that query would return all 'Ba%' (which means that you'll have to use a wildcard).
Finally, go to the detail block (GO_BLOCK) and EXECUTE_QUERY. Don't forget to set the default ORDER BY clause for that block.

For more information about the above, search the board - there've been examples of how to do that.

[Updated on: Mon, 14 June 2010 06:25]

Report message to a moderator

Re: Capture Key press in Oracle Forms [message #464243 is a reply to message #460752] Wed, 07 July 2010 01:49 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Sorry that I have been so long in replying. Have you solved your problem?

Can could create an LOV on the name field and have it pop-op automatically when the user enters the field and then as the user keys the name the list will get shorter and shorter.

David
Re: Capture Key press in Oracle Forms [message #466332 is a reply to message #464243] Mon, 19 July 2010 01:46 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

There is no key-press function in forms. You have to make a little twist/workaround using timer.
Re: Capture Key press in Oracle Forms [message #527123 is a reply to message #466332] Sat, 15 October 2011 05:13 Go to previous message
lingamgunta
Messages: 1
Registered: October 2011
Location: Indianapolis
Junior Member
We can do it using timer, but it doesn't look good because, mouse pointer style(busy) is changing when the timer is expired.
Previous Topic: display blob column in a form (not image)
Next Topic: ora-04062 when-valida-item-trigger raise unhandled exception
Goto Forum:
  


Current Time: Sun Aug 11 09:49:20 CDT 2024