Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function Find in Display List menu option?

Status
Not open for further replies.

marcarls

Programmer
Feb 7, 2002
40
0
0
SE
Hi,

I have to fields, one where user can enter an ID and then the corresponding actor name will appear in a field next to the right. If the user do not now the ID I want him/her to be able to use Find function in my LOV.
The LOV contains ID and the actors name. When user selects a record, the ID is assigned to the ID field in the form and the Name to the field that is used to display the field.
As it is now the Findfunction searches on the ID and not the name. Hiw can I change this without having the LOVs value changes, which should be the key actor_id.

Regards Maria
 
Dear Maria,

If I am not wrong you have two items in your form. One is actor_id and the other is actor_name. If the user enters actor_id the name of the actor appears in the actor_name field. Probably you are accomplishing this with a when-validate-item trigger.

And I again if I did not misunderstand you want to search actor_id and actor_name by the help of LOV.

I think one of the best solution is to create LOV which select all actor_id and actor_name from your table. In LOV wizard there is a tab called column_display. Here you can assign return items in your form to the values in your LOV.

Good Luck !
 
You have understand me completely. I have all those parts including the LOV with both actor_id and actor_name. My concern is that when I use the "Find-button" it searches on the actor_id and that is not specially meaningful, since it is one the name I want them to search. But I do not know how to achieve this.
Should I swith place on the both fields in the LOV, but still I would like to present the actor_id first.

Thank you very much for your answer! I am very greatful, since I should be finished on friday :)
 
Hi,

Again I hope I understood the real problem :)

in LOV wizard second step is the query so your query should be
select actor_id, actor_name
from [table_name];

in the next step you will select both columns, you can change their places but first id then name makes more sense. So when you LOV is invoked by the find-button than you will see both id and name.

Final point, in LOV Wizard also you have to mention the field_name in COLUMN DISPLAY tab, (there are 4 field in this tab; column, title, width and return_item)so when actor name is selected it will return to that field in the form. Also in few steps later in ITEM tab you have to add this field.

In summary you LOV will display two fields; actor_id, actor_name and will return one value to the form actor_name

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top