Jump to content
  • 0

sorting search form drop down list by last name then first


tbarmann
 Share

Question

Hi,

My database contains a list of people. Each record has a field for first_name, last_name, and full_name.

I want my search form to display full_name, but sort the search drop down box by last name, then first name. I have tried changing the drop down box sort to value, and choosing the last_name for value and full_name for display, but then I have to change the comparison type to "CONTAINS". The problem with that is it returns records for more than one person if they have a common last name.

What's the best way to sort the search drop down box by last name but still search the database by full name?

Thanks,

Tim

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Search results will be based on dropdown value and not display field. So you should have full-name for the vaule if you want to have the comparison type equal. I can not think of a solution except you have the full-name start with the lastname then first name. So full-name contains lastname+firstname and you can have both Display and Value of the dropdown set to full-name.

Best,

Bahar M.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...