AnsweredAssumed Answered

Unique ID across all tables, best practise?

Question asked by tobiasj on Jan 27, 2014
Latest reply on Jan 27, 2014 by tobiasj


Unique ID across all tables, best practise?




     I'm very new to Filemaker Pro 13 (few days into trial), so please bear with me.


     The business rules I work under, dictate that all items in the inventory system must have unique IDs. That is, can't have a Furniture table and a Component table which both have tuples with similar IDs, and the question then is, how do I best accomplish this?


     I have already set up a script to create a 'BaseAsset' record, which autogenerates the ID, and serves as the base for all other tables, linked by the ID. I'm in doubt if this is the way to go, maybe it's prone to errors I can't recognise as a newbie?


     I would prefer to set up a single table for all types of items, but the problem is that they are very different and require different kinds of fields. Since the data validation is performed on basis of the fields in the tables (rather than the fields in the layout), it's very difficult to assert that the right kind of data has been entered (silly to require an entry for voltage for a piece of furniture). But perhaps there are ways in which to validate the data on a per-layout basis, rather than on a per-table basis?


     Hope this makes sense, and thanks for your time :-)