Method Community

 

Search functions

Last post 05-03-2012 10:17 AM by Anonymous. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-02-2012 6:03 PM

    Search functions

    I have created a large number of fields to document contact information for each Customer.  Some of my customer sites have 15 contacts.  So I have created ContactName1; ContactCell1; Contactemail1; ContactName2; ContactCell2; etc.

    I need to be able to search for names in these fields.  If someone needs a phone number for "Mr. Smith" and they don't know what customer  he associated with he's very difficult to find.


    Is there a way to search for 1 name in all of these fields or did I do this all wrong from the beginning?

     

    Thanks,

    Greg from WaveTec

     

    Thank you,
    Wavetec
  • 05-03-2012 10:00 AM In reply to

    Re: Search functions

    Answer

    Wavetec:
    I have created a large number of fields to document contact information for each Customer.  Some of my customer sites have 15 contacts.  So I have created ContactName1; ContactCell1; Contactemail1; ContactName2; ContactCell2; etc.

    Please see my solution about adding more than one email to a customer contact.  What you've done here is going to cause headaches and slow downs as you populate.  You always want to build a relationship on duplicate information.  Ie. if you require more than 1 cell number, build a CellNumberTable and store the Entity along with each cell number; if you require extra emails, build a ContactEmailTable.

    Wavetec:
    Is there a way to search for 1 name in all of these fields or did I do this all wrong from the beginning?

    Instead of searching a very large customer table will all those extra fields, you can simply search a CustomerEmailTable or CustomerCellTable for much quicker results.  

    If you find you need to add additional (duplicate) information to a stock table then your should consider a relationship table.  The minute you look at the Customer table and say, hey I need to store 2 emails for my customers, consider how your table will look with 15 emails per customer.  Having ContactEmail1 - ContactEmail15 is really going to slow the entire Customer table down.  

    If you have any problems with your implementation or screen/table design please contact us for consulting.  We can point you in the right direction with a session or build it for you.

    ~C 

  • 05-03-2012 10:17 AM In reply to

    Re: Search functions

    I would recommend having a look at some database normalization articles to better understand good database design.

    ~C

Page 1 of 1 (3 items)