Home » Developer & Programmer » Forms » LOV issue
LOV issue [message #169105] Tue, 25 April 2006 02:07 Go to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
I have a LOV associated with a text field, but the problem here is the LOV is being displayed only when the user presses tab from the field.

I need to display the LOV as the user types in some values in the field, (i.e., still the user has not stepped out of the field by pressing the tab) also need to display the LOV values filtered as the user types in some value to the field.

Anyone have idea how this can be achieved.

Thanks


Nirmal
Re: LOV issue [message #169114 is a reply to message #169105] Tue, 25 April 2006 03:03 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'd expect it to be displayed when user presses <List of values> (is it Ctrl+L, mapped to F9 or whatever) and not <Next item>. Did you map it to the TAB key?

I *think* that validation can not be done at level you'd like to (during the "typing" phase), but at the point user exits this field. However, what you might do to prevent false data to be entered is enabling the "Validate from list" property on item that has List of Values attached to it.

Filtering LoV data can be done such as

SELECT deptno, dname
FROM dept
WHERE dname LIKE :dept.dname || '%'

or any similar way.
Re: LOV issue [message #169126 is a reply to message #169114] Tue, 25 April 2006 03:51 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Littlefoot wrote on Tue, 25 April 2006 10:03

I'd expect it to be displayed when user presses <List of values> (is it Ctrl+L, mapped to F9 or whatever) and not <Next item>. Did you map it to the TAB key?
When you set the property "validate from list" the LOV is automatically invoked when the item is validated. that's when I'd like a list. If a user entered a correct value, there's no need for a list, right Wink.

MHE
Re: LOV issue [message #169130 is a reply to message #169126] Tue, 25 April 2006 04:25 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Right!

That's exactly what Forms does:
Forms Online Help

When Validate from List is Yes, Oracle Forms compares the current value of the text item to the values in the first column displayed in the LOV whenever the validation event occurs:
- If the value in the text item matches one of the values in the first column of the LOV, validation succeeds, the LOV is not displayed, and processing continues normally.
- If the value in the text item does not match one of the values in the first column of the LOV, Oracle Forms displays the LOV and uses the text item value as the search criteria to automatically reduce the list.(etc.)
What I meant to say was this: if the user enters, for example, 'SALES' into the "dname" field and presses nothing else (TAB, Enter, Ctrl+L ... nothing after the last "S"), Forms will do nothing because it doesn't yet know that validation should occur.

If I understood it well, Nirmalnarayan wanted validation BEFORE pressing the TAB key. I still think that this isn't possible.

OK, I guess things are quite clear here. I'm sorry if I was misunderstood; explaining things in foreign language isn't always as easy as I'd like it to be Smile
Re: LOV issue [message #169155 is a reply to message #169130] Tue, 25 April 2006 06:43 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Thanks Littlefoot,

You guessed it right, i need validation BEFORE pressing the TAB key, but i think it is something impossible in FORMS, can you suggest any workaround to achieve the same.

i.e., while you type something in the field, the LOV should be displayed, filtered with the entered value.

I.e, if the user types 1 the LOV will display values starting with 1.


Nirmal.
Re: LOV issue [message #169157 is a reply to message #169155] Tue, 25 April 2006 06:56 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
I must be missing something but normally you want to validate a field when the user has finished typing, right? If you'd set the Validate From List property the list will pop up when the user entered an incorrect value and tries to navigate out of the field. If he entered a correct value, the list is skipped (it serves no purpose). That's the way LOV's are intended. Perhaps you need to look at a list item instead. I don't think you can accomplish what you want using default Forms functionality. Perhaps a Javabean component could help you out?

MHE
Re: LOV issue [message #169163 is a reply to message #169157] Tue, 25 April 2006 09:00 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Thanks for replying.
I have no idea of Javabeans, can you help me in this ?

Thanks,

Nirmal
Re: LOV issue [message #169173 is a reply to message #169163] Tue, 25 April 2006 09:37 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
I just thought of another option: a combo box. Then you can let the end user type in the combo box and rebuild the list in the WHEN-LIST-CHANGED trigger.

I created a (very) small example. Run it under the default HR schema.

MHE
  • Attachment: listform.fmb
    (Size: 44.00KB, Downloaded 345 times)
Re: LOV issue [message #169831 is a reply to message #169173] Sat, 29 April 2006 02:05 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Nirmal, did the list-item approach deliver what you wanted? Just a small reminder that this is not advisable though, because at each and every manipulation of the list a query is launched against the database.

MHE

[Updated on: Sat, 29 April 2006 02:06]

Report message to a moderator

Re: LOV issue [message #281788 is a reply to message #169831] Mon, 19 November 2007 05:37 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
Dear Maaher,

You are right that this type of solution is expensive because the each time user press the search button the database has to be required.

But I have also said that this procedure can also be modified to more advance version

Which means like you query the whole records once and then filter the records into another nonbase table to show it to the user

In this way you dont have to query each time user change its search.

Dear Maaher a good programmer must has more then one alternate.

Regards,
Azam Khan
Re: LOV issue [message #281791 is a reply to message #281788] Mon, 19 November 2007 05:41 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
True, that's why I never implemented this on production. I'd probably use a standard LOV.

azamkhan wrote on Mon, 19 November 2007 12:37

Dear Maaher a good programmer must has more then one alternate.
I always thought it was like this: "A good programmer is an excellent thief". Very Happy

MHE

[Updated on: Mon, 19 November 2007 05:44]

Report message to a moderator

Re: LOV issue [message #281925 is a reply to message #281791] Tue, 20 November 2007 00:59 Go to previous message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Oh! did'nt knew that this thread is still attracting people .........
Previous Topic: Form6I flicker on Dialog Box - Switching Sessions
Next Topic: How to change URL and hide password in browser when running a form?
Goto Forum:
  


Current Time: Sun Dec 11 00:43:55 CST 2016

Total time taken to generate the page: 0.03992 seconds