Hi - me again
Just took another look at your code.
Two things you need to do:
-
The ID is just the ‘next’ integer. So you don’t need that big swtich. When you come to allocate an ID, you just use to next integer higher than your current highest ID.
-
You ‘database’ is a collection of BPs ( right? ). The ID just lives in the BP along with everything else ( name, date of birth, yada yada ).
When you want to know everyone in one family, you just loop through all the objects looking for ones with the correct ID.
Tell me if this is of any use…