What specifically are you having trouble accomplishing?
Objectives should have a field for Project ID. Activities should have a field for Objective ID and probably Project ID as well.
The 'numbers' would be generated by using a relationship to look through a relationship and grab the highest current number for the Objective that shares that Project ID. This could be a scripted process as well.
Thanks for the quick response.
I need to know how to automatically populated the Objective ID and Activities ID based on that. I'm guessing a script is the way to go but not sure what to search for in order to find an example to work off. I'm new to Filemaker!!
There are a number of variations of the following method possible:
Use a script to create new Activities record.
Run this script from the context of the Objectives record to which you plan to link the new Activities record:
Set variable [$ObjectiveID ; value: Objectives::ObjectiveID ] //this should be the primary key field in objectives
Set variable [$ActivityIDLabel ; value: Max ( activities::LabelNumb ) + 1 ]
Go to layout ["Activities" (Activities) ]
Set Field [Activities::ObjectiveID ; $ObjectiveID ]
Set Field [Activities::LabelID ; $ActivityIDLabel ]
Go to Layout [original layout]
A calculation field in Activities can then combine ObjectiveID with LabelID to produce the desired result:
ObjectiveID & "." & LabelID
Please note that this value is NOT used to link the activities record to a given objective in a relationship. It is purely used for display and possibly search/sort purposes. It also is not the best choice for use as a primary key in activities.
Also note that I have provided a very simple way of creating related records. There are several other methods that can be used to produce the same results that can be a better, but more complicated option as the other methods can avoid tripping script triggers or changing focus on the current layout.
This is great, thank you very much. I will have a play and see if I can get it to work. I already have the relationships built in so it is just a matter of generating this new number. I have a feeling this isn't the best way of doing it but will meet our needs for now.