Newbies bayfield Posted December 3, 2007 Newbies Posted December 3, 2007 Is it possible to enter a record into a "master table" and have that record automatically inserted into other tables based on flagging specific fields? For example, if I flag the field foo and foo2 in the master table, a record is automatically added into my foo table and into my foo2 table. I used to use FMP alot but have not since version 5.5 or thereabouts.
David Jondreau Posted December 3, 2007 Posted December 3, 2007 Why would you want to do that? Sounds like you're db is not structured correctly.
Newbies bayfield Posted December 3, 2007 Author Newbies Posted December 3, 2007 I am just starting to build a db. I have one master table and several other tables. The master table has all the basic info, names and numbers, and I have set up all the tables to have an id field so I can use data from the the master table in all other tables. It just seemed reasonable to create a row in the other tables if I new that I would be adding them anyway. If your in my general list and you are a board member, a volunteer and you donate financially, would it not be easier to create those entries based off one entry in the general list?
David Jondreau Posted December 4, 2007 Posted December 4, 2007 I see what you're getting at. You can do this a couple ways. Create a number field in Volunteers, that'll be either null or 1. Relate Volunteers to the Master table via your ID field and allow creation of related. Put the related number field on the master layout next to a check box labelled Volunteer. Define it as a radio button off a value list with one value, 1. When that box is checked, a record will automatically be created in the Volunteer table. Since it's a radio button it can't be unchecked (well it can by shift clicking which is a weakness of radio buttons). Another way would be to make the checkbox for Volunteer in the Master table and make the field a script that creates/deletes a record in the Volunteer table and marks the field.
T-Square Posted December 4, 2007 Posted December 4, 2007 I agree with your first point DJ regarding structure. Although I am jumping without full information, it looks as if bayfield is trying to establish different roles for a single individual. It sounds like you have separate tables for each role (a Volunteer table, a Board table, etc.). But what happens when your client (or you) decides to add a new role? You'd have to add a new field in the Master table, a new table for the role, new scripts, new everything... You could accomplish this more elegantly by having a Roles table to define the different roles in the system (each row in this table defines a role), which has a join table PersonRoles that has PersonID and RoleID fields in it. A portal to this join table would allow you to select an unlimited number of roles without additional tables. The portal would automatically create a new record in the join table when you selected a new role for that person in the portal (provided you set the relationship to allow creation of records). David
Newbies bayfield Posted December 4, 2007 Author Newbies Posted December 4, 2007 I have tried the button/checkbox concept and it seems to work ok. I am issueswith having a checkbox be a button at the same time but it has given me an avenue to look into, thanks. I will continue to play with it.
Newbies bayfield Posted December 4, 2007 Author Newbies Posted December 4, 2007 I think the issue with this approach is that the other tables contain information that I need to track and do not want in my main list. At this point I need the other tables although you have given me ideals about how to set up structure for tracking multiple pieces of information on individuals using one "role" table. Thank you.
Recommended Posts
This topic is 6257 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now