2 Replies Latest reply on Jan 18, 2014 2:47 PM by erolst

    Getting value from another related field (ID) when using type ahead to select a contact

    slayden@msn.com
      1. I have a CRM database where I need tie actions to contacts
      2. I have a field in the Action table ScheduleWithPersons, which I have type ahead on the contact's fullName field. This works fine.
      3. BUT, I need to relate the action to the contact's ID, not his/her name, as his/her name is not protected as static like ContactID is
      4. The only way I've come up with so far is to do an instant lookup on the contact's table for the id.
      5. is there a better way to instantly pull a contact's ID when I've type-ahead identified that contact????

      Thank you in advance!

        • 1. Re: Getting value from another related field (ID) when using type ahead to select a contact
          Mike_Mitchell

          Type-ahead is a poor method to associate a text field with an ID. Reason: If you have more than one person (in this case) with the same name, you'll have two IDs. Which one do you get? (Answer: The oldest in creation order.)

           

          Better method: Create a list view with all contacts and allow the users to select the one they want from the list. Use popovers or tooltips to provide enough information so people with duplicate names can be distinguished from one another. Store the ID in a variable, then insert it into the appropriate field.

           

          HTH

           

          Mike

          • 2. Re: Getting value from another related field (ID) when using type ahead to select a contact
            erolst

            You can define a value list to show an ID as the first, and a name as the second value. Format the foreign personID field in Contacts (I'm assuming that you only assign one (1) person to a contact) with the value list, and type ahead. Selecting the name will actually insert the ID.

             

            This approach has certain issues, as in popup vs. drop-down, actually displaying the name only and not the ID in drop-down, type-ahead of Mac vs. PC etc.; so you need a workaround, or simply use a portal. Find attached a file that shows both approaches.

            slayden@msn.com wrote:

            1. is there a better way to instantly pull a contact's ID when I've type-ahead identified that contact????

            I think one question mark is sufficient to get across the point that you're asking a question …

            1 of 1 people found this helpful