2 Replies Latest reply on May 9, 2014 6:39 AM by wimdecorte

    Retrieving a Primary Key

    jmproulx

      I want to get the primary key of a record in a Personnel table. I have the name of the person corresponding to the FullName field. How can I do this ?

        • 1. Re: Retrieving a Primary Key
          erolst

          jmproulx wrote:

          I have the name of the person corresponding to the FullName field. How can I do this ?

           

          • perform a search in Personnel

           

          • use a utility relationship matching a global field against Personnel::cNameFull to read the key from the first matching record

           

          • do a(n) SQL query

           

          • delegate …

          • 2. Re: Retrieving a Primary Key
            wimdecorte

            Do a find on the full name and capture the ID.  This requires that you change to the Personnel context for the find. 

             

            Or use ExecuteSQL() to ask for the ID through a SQL query.  This one would allow you to stay in your current context.

            1 of 1 people found this helpful