I’m setting up my data sets for an application which will have companies, team members, and projects. Each of these data sets will have additional fields.
I’d like to associate the team members and projects to the company so when you view the company page you can see 1:MANY.
My thought is to either:
- create data types for all three and then on companies to add two fields of “Team Members” and “Projects” where each is a list of there respective types.
– or –
- create the data types and simply have a field in "Team Members and Projects that references back the unique ID of the company?
My thought is that I do want there to be a relationship / join defined, but I also want to be able to view a list of all projects or all team members easily.
I’d do both. It prevents you from ever having to search the entire database when working with those data types.
How do you ensure then that the field in Team Members or Projects for the uniqueID stays joined correctly? Is it that the unqiueID should be set at time of creation of the Team Member or Project and since that will never be changed it is good to go – just don’t touch it again?
Hi @chrismoris. Indeed, as you want to add extra fields in your data types, I recommend to create 3 data types:
fields: Companies = Company
Project = List of Projects
fields: Team member = List of Users
Project = List of project
Fileds: Team member = List of Users
Companies = Company or (List of company: it depends allow 1 project from many companies).
I usually set it at the time of creation and it’s good to go. It does result in somewhat longer workflows on creation because you need to make sure you change the appropriate things. Here’s what a project creation workflows could look like:
Create a new project
-Title = some input
-Company = parent group’s company (this depends on your page setup)
-Team members = parent group’s company’s list of team members
Make changes to the company
-Projects add result of step 1
Make changes to team members
-Projects add results of step 1