![]()
And really, these are the types of errors that can go hidden for a very long time, possibly forever. #Filemaker pro serial number updateIf the table is locked and there is no error handling for such a case, however, the script could update the wrong record and the user would never know about it. It is a very common practice, immediately following a New Record / Request script step, to use a Set Field step (or multiple Set Field steps) to set values into various fields in the new record. Even though records cannot be created until the lock is released, existing records can still be updated. ![]() This is really important, and is where data integrity issues can be introduced. This will occur if, say, a user clicks the New Record button in the Status Area, but what would happen if the record creation occurs during a scripted process? And to further complicate things, what if a developer has added a Set Error Capture script step? Depending on where the Set Error Capture step is added, FileMaker might not display a dialog. If a user tries to create a new record, manually, while a database developer is doing one of the above activities, FileMaker will display a dialog alerting the user that an error was encountered. This is really important when a table is locked, no new records can be created in the locked table by a user or a script. Viewing or modifying a Calculation field formula.The following activities will lock a table in FileMaker: ![]() I think it is worth taking a moment to review what happens when a table is locked by FileMaker, and perhaps the best place to start is to know what specific activities will lock a table. It is so easy to set up a field to manage these things that most developers do not even think twice about it. #Filemaker pro serial number serial numberAuto-enter serial number fields are used all the time for a variety of reasons (invoice numbers, part numbers, check numbers, etc, etc). I used the example of a Primary Key because it is one of the more common uses of an auto-enter serial number, but it is not the only use by any stretch. The Get (UUID) function, and Get (UUIDNumber) functions return a universally unique identifier (UUID) which solves the uniqueness problem. When the data is combined into a single table, records would lose uniqueness presenting a major problem.įileMaker gave developers another way to create a unique identifier which addressed these issues when they introduced the Get (UUID) function in FileMaker Pro 12 and Get (UUIDNumber) in FileMaker Pro 17. In such a case, a serial number is not sufficient as a unique identifier as each team member’s copy of the application would be creating records with an incremented number. For example a sales team working in the field and where each team member collects contact information in a local copy of the application in FileMaker Go. The only exception to this was if data in a particular table would need to be merged or synced with a mirror of that table in another file. This ID would serve as the unique identifier for the record.įileMaker Pro 18 (and FileMaker Pro 17) will auto-create the Primary Key field for you, using the Get (UUID) function, when a new table is created. Auto-enter Serial number versus Get (UUID)Īny time a new table is created in FileMaker, the first attribute I typically created was an ID field with an auto-enter option set to enter a serial number. Read Kevin’s post on this topic here: Live Development + “New Record”. ![]() #Filemaker pro serial number serial numbersFields set to Auto-enter Serial numbers are used all the time and for many different reasons. As our discussion continued, the recurring theme was “ Is there anything more we can do in these cases”? Danny then shared an idea he had been introduced to by Kevin Frank that I’d not heard before that a contributing factor to FileMaker locking a table had to do with how FileMaker manages fields that auto-enter a serial number. #Filemaker pro serial number how toThe big question was how to (or could we) protect data integrity when making schema changes? The more obvious choice is to ensure that your scripts check for and manage any errors they encounter, including errors encountered if a table is locked, but not all developers use such extensive error trapping. In a recent conversation, Danny Mack and I were discussing how to maintain data integrity for a highly complex application in which we knew that database administrators would be in Manage Database often. ![]() When making these changes, FileMaker will lock the table and prevent the creation of new records. If, like me, you have been developing and supporting FileMaker solutions for many years, and even if you’re newer to the platform, you have no doubt learned when (and when not) to make changes to schema for apps being used in production. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |