MYK Posted February 21, 2006 Posted February 21, 2006 Hi Please help. Since I've been using Filemaker (not that long now) I've created a number of datbases, but this is the first real problem I've encountered. I'm creating a Personnel database which contains a list of items they have in their hardcopy records. I currently have three tables: EMPLOYEES, EMPLOYEE FILE CONTENTS and FILE CONTENTS. Employees is obvious. EMPLOYEE FILE CONTENTS is an intermediary table between EMPLOYEES and FILE CONTENTS. FILE CONTENTS contains a list of items (i.e. Application Form, Personal Details Form, Emergency Contacts etc). What I need to do is have a portal in my EMPLOYEES layout which lists every item in FILE CONTENTS and also has a tick box which records the items they have. I'm sure there is a much easier way to explain this, but like I say I'm fairly new. I know it can be done because I've done it in Access before. Thanks.
Reed Posted February 21, 2006 Posted February 21, 2006 Usually when I do this, I have 2 portals... one that shows all the items, and a separate one that shows the items belonging to each employee. In this method, you use a script on the "file contents" portal row, to create the join record using script parameters of employee_id and filecontents_id. (To use multiple script parameters, you define one parameter with each item separated by a return. Later you use the GetValue() function to retrieve the one you want.) Using these parameters, you use the Go To Layout[] script step to go to a layout for the join table, and then create a new record using your script parameter values. I haven't done this where a checkbox is filled in the "file contents" portal, but I'd imagine that you could use an unstored calculation field like: Case(IsValid(employee_table::employee_id);1;0) Like I said, I haven't actually used the checkbox to display, since there are usually thousands of items in my "file contents" portal... If you get stuck on any of the details, post your file, and I (or someone) can help out further.
MYK Posted February 21, 2006 Author Posted February 21, 2006 Hi Reed Thanks for replying. I don't get the last part at all, however the first suggestion does make sense. Not really what I was looking for, but I would settle for that solution. Problem is I've never used Script Parameters and quite frankly don't know how. I've look around the forum, but still can't figure it out. I've attached something along the lines of what I'm looking for and any further help would be greatly appreciated. If anyone else knows a solution to the checkbox issue, I would be very greatful for your input. Thanks again! checkbox_list.fp7.zip
Reed Posted February 22, 2006 Posted February 22, 2006 here's an example of the non-checkbox way. I'm not sure I can get the checkbox to appear in the all items portal specifically for each employee. Maybe someone else can help with this, but I can't figure out the way to simultaneously show all items in the portal for all employees but have the checkbox show only for the records in the join. checkbox_list.fp7.zip
MYK Posted February 23, 2006 Author Posted February 23, 2006 Hi Reed This is brilliant! Actually, in practice this much better than my initial checkbox idea. Thankyou very much!
Recommended Posts
This topic is 6906 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