1 2 Previous Next 20 Replies Latest reply on Mar 8, 2012 9:47 AM by tech_liaison

    Get(Record ID)

    JohnSarappo

      In a multi-table solution, will the Get(Record ID) value be unique for every record in every table or could a particular integer ID value appear in several tables.

       

      For example, contacts table, a record generates a Get(Record ID) value = 12345

       

      Could that value for Get (Record ID) = 12345 be the Record ID for another record in a different table within the same file? (contact addresses, for example).

        • 1. Re: Get(Record ID)
          skywillmott

          Hi there,

           

          Good question, but I imagine it may or may not well occur..., especially when external data sources are used...

           

          Check out http://fmhelp.filemaker.com/fmphelp_10/en/html/func_ref2.32.53.html

           

          Within your solution, almost certainly best to rely on your own unique ID serial number in each table for relationships between tables.....

           

          Sky

          1 of 1 people found this helpful
          • 2. Re: Get(Record ID)
            gcatnine

            each table has is own record ID sequence that starts from 1 (first created record). This ID is unique in the table and does not change.

            So, you can have same IDs in different tables

            1 of 1 people found this helpful
            • 3. Re: Get(Record ID)
              skywillmott

              Yeah, sound about right.... It's to do with creation order of individual records within a table, essentialy the 'Unsort' option when sorting records...

               

              Kinda like the field creation order, rather than name order, or type, sorts within a table definition field list...

               

              Sky

               

              ps, tomorrow 7th Mar, gonna be an exciting day!..... If you love iPad... I do.

              • 4. Re: Get(Record ID)
                sicoa

                As already said Get(RecordID) is unique only across the specific table for which you are using the calculation.

                 

                If you want to create a unique identifier for each record, then on each table create a text field and then choose Serial Number and set the next value to be XXX_1 where XXX the unique table identifier.

                 

                At least that way you always have a unique ID per record across the whole db. This of course would not guarantee uniqueness if connected with external systems

                • 5. Re: Get(Record ID)
                  skywillmott

                  .....!! Seriously, sounds like a bad idea to use a text field as a unique id..... Number serial all the way....

                  • 6. Re: Get(Record ID)
                    JimmainSolutions

                    Nope, he is using the auto-enter serial number, but it has to be defined as a text field, because he's prefixing the serial number with text. E.g.:

                     

                    Con_1 (for a Contacts table)

                    Adr_1 (for an Address table)

                     

                    Filemaker will keep incrementing the number part, while maintaining the text prefix.

                    • 7. Re: Get(Record ID)
                      sicoa

                      Unique IDs dont have to be numbers only! A lot of enterpise systems use text to generate unique IDs!

                      • 8. Re: Get(Record ID)
                        skywillmott

                        True... That works fine.... Same way as keeping carriage returned lists in a single text field to relate to multiple related records... An old Skool method I used to use... Kinda fun using GetValue(from a carriage returned list) in SetVariable stuff in scripts.... :-)

                        • 9. Re: Get(Record ID)
                          skywillmott

                          ... One of the nice things that FM does.... It's so lenient.... Love it.

                          • 10. Re: Get(Record ID)
                            Malcolm

                            As already said Get(RecordID) is unique only across the specific table for which you are using the calculation.

                             

                            Don't use Get(RecordID) to generate IDs that will be used to identify records, ie, serial numbers. You have no control over the record ID.

                             

                            You are in complete control of an auto-entered serial number.

                             

                             

                            Malcolm

                            • 11. Re: Get(Record ID)
                              beverly

                              I wanted to correct the statement "does not change". The internal record ID is unique to each table. You can import records (even the same records from the same table) or duplicate records. The internal record ID is NOT the same for these new records. And that's a GOOD thing!

                               

                              So the "does not change" (after creation)  is true, but remember the above with duplicates and imports. You may think the records are the same, but they are not.

                               

                              It's great to use RecordID to identify a particular record at that point in time, but never should be used in a relationship.

                               

                              You can import and also over-ride the auto-enter serial number. Otherwise we'd never be able to sync. So read the threads on unique ID, if you will need to preserve a relationship upon import.

                               

                               

                              -- sent from my iPhone4 --

                              Beverly Voth

                              --

                               

                               

                              each table has is own record ID sequence that starts from 1 (first created record). This ID is unique in the table and does not change.

                               

                              • 12. Re: Get(Record ID)
                                gcatnine

                                Your "correction" could only create confusion.

                                When you copy or import you create NEW records, so they have their own new RecordID.

                                So, if a record is not deleted, his RecordID do not change (and that is independent from the data it contains).

                                • 13. Re: Get(Record ID)
                                  DrewTenenholz

                                  bmschace --

                                   

                                  Let me echo Beverly's statement:

                                  • 14. Re: Get(Record ID)
                                    comment

                                    gcatnine wrote:

                                     

                                    Your "correction" could only create confusion.

                                    When you copy or import you create NEW records, so they have their own new RecordID.

                                    So, if a record is not deleted, his RecordID do not change (and that is independent from the data it contains).

                                     

                                    I think it is worth pointing out that RecordID is file-specific. If you move your data to another file - for example, a new version of the solution - all your existing records will be issued a brand new RecordID, which may not be the same as the old one.

                                    1 2 Previous Next