R2D2 Posted June 6, 2011 Posted June 6, 2011 Hi ! I have 2 tables: Main table and personnel table. In the main table I have a "Name search" -field. When I start writing name to the search field I get a drop down list via relation to personnel file with auto-complete on (Main::LastName = Personnel::LastName). Only last name is possible to use for searching and selecting a person. Is it possible to define this relation or field so that I can use either first name or last name for searching ? Hope you understand what I mean...
Vaughan Posted June 6, 2011 Posted June 6, 2011 Create a calculated field that concatenates (joins) the first and last name fields: firstname & " " & lastname Do the search in this field.
R2D2 Posted June 6, 2011 Author Posted June 6, 2011 Create a calculated field that concatenates (joins) the first and last name fields: firstname & " " & lastname Do the search in this field. Well... I created a joined field cName to the "Personnel" file and changed the relation from SearchField to point to that. It still gives me a list of only first names starting with those letters I type in. The idea is that when I start typing "John", the list shows me "John Smith", Matt Johnsson" etc. regardless if "John" is in first or last name.
comment Posted June 9, 2011 Posted June 9, 2011 Why don't you post your file. I for one cannot follow what you describe, esp. "I get a drop down list via relation to personnel file with auto-complete on (Main::LastName = Personnel::LastName)".
R2D2 Posted June 9, 2011 Author Posted June 9, 2011 Why don't you post your file. I for one cannot follow what you describe, esp. "I get a drop down list via relation to personnel file with auto-complete on (Main::LastName = Personnel::LastName)". The file I'm working with is too big to be sent, but I'll try to build up a sample file.
R2D2 Posted June 9, 2011 Author Posted June 9, 2011 Ok... Here's the idea in a sample file. When I start typing "John" to the gNameSearch field, both first and last names containing "john" would be shown in the drop down box. Then I could use only one search field to find right person regardless I use first or last name. Propably the solution is very simple, but I'm just lost with this. NameSample.fp7.zip
comment Posted June 9, 2011 Posted June 9, 2011 (edited) It can't work that way when using auto-complete. You could try a scripted find instead, triggered OnObjectModify. --- Well, maybe... NameSample.zip Edited June 9, 2011 by comment
R2D2 Posted June 9, 2011 Author Posted June 9, 2011 It can't work that way when using auto-complete. You could try a scripted find instead, triggered OnObjectModify. --- Well, maybe... Yes ! That could work - although I don't understand how you did it...
R2D2 Posted June 10, 2011 Author Posted June 10, 2011 It can't work that way when using auto-complete. You could try a scripted find instead, triggered OnObjectModify. --- Well, maybe... I have now tried to understand what you did in the file. I cannot see any changes there but now it works. So, what did you change there ?
R2D2 Posted June 10, 2011 Author Posted June 10, 2011 The calculation field's formula. Oh yes !! Now I get it ! Thank you very very much !
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now