Newbies Mysha Posted December 3, 2009 Newbies Posted December 3, 2009 Hi, Im new to FileMaker as I am a MySQL user. Im using FileMaker Pro 10.0v1 on Windows Vista. I'm trying to complete a practical which is suppose to be very easy ..im stuck on the last "button" task. Can someone please enlighten me? Here is the practical The database will have two tables: Table 1 Field Names: ID Number, First Name, Last Name, Job Title, Service ID Table 2 Fields Names:Service ID, Service Name, Phone Relationships: The two tables will be linked via Service ID. Data There will be six individuals in Table 1 (create their names and job titles yourself) There will be three services in Table 2 (create their names and addresses yourself). Link two individuals to service #1, three to service #2 and one to service #3. Portals: There will be a portal in table 2 showing the individuals associated with each service. Buttons/Scripts: In Table 1 there will be a button to create a new individual. In Table 2 there will be a button to create a new service. In Table 2 there will be a button to link an individual to that service. Help will be much appreciated Mysha
comment Posted December 3, 2009 Posted December 3, 2009 Don't you need to select an individual, before you can link them to the current service?
Newbies Mysha Posted December 3, 2009 Author Newbies Posted December 3, 2009 Yes it only makes sense if you can select an individual. Although the question doesn't ask for it..I have been trying to create a drop down list (of the individuals) by using the field/control tool without success... I only know how to create a valueList of all individuals. How should I do it? Thanks, Mysha
agutleben Posted December 3, 2009 Posted December 3, 2009 (edited) Create a value list (values from field based on service table where the first value is the Service ID and the second value is the Service Name) using All values and show only the second value. On your Contact layout, locate the Service ID field and enter field setup. Change the type to a PopUp Menu (NOT Drop Down Menu) and choose the value list that you just created. This will allow you to select a service and populate the ID in one step. This should give you what you are looking for. There are cases where this is not ideal however. If you have a lot of service records, then it's best to either create a filter so that you can widdle down the found set used to populate the value list or create a picker mechanism rather than use a value list. Also, when using a PopUp Menu in the way I described, FileMaker populates the Service ID field with the ID, but will display the Service Name. If you need to print a report or export the Service Name from the context of the Contact layout, then you'll need to pull the service name through the relationship into a local attribute or simply display the related data.. You mentioned that you wanted to create this value list from contact data, but you created service ID fields in both tables. So, you can follow my instructions, just change the context if you want contact data instead. I assume however, that you will have many more contacts than services (though I could be mistaken) which is why I used the example that I did. HTH! Edited December 3, 2009 by Guest
Newbies Mysha Posted December 3, 2009 Author Newbies Posted December 3, 2009 Thanks for your help, Ive done that also . As per the question I need a button on the Service layout that links the service to a specific contact/individual. How do I modify the serviceId field of a selected contact from the service layout??
agutleben Posted December 3, 2009 Posted December 3, 2009 It sounds like what you need is a portal on the service layout that shows all related contacts. Then, within the portal row you want a button that (when clicked) takes you to the contact layout. Is that correct?
Newbies Mysha Posted December 3, 2009 Author Newbies Posted December 3, 2009 Yes, i guess a button on the field of a portal that will lead to the contacts record would be good. I currently have a portal on the service layout showing only the individuals associated with each service. Is there a way to show individuals/contacts that are not related (dont have the same serviceID). THen have a button to lead to the contacts record? Thank you.
agutleben Posted December 3, 2009 Posted December 3, 2009 (edited) Sure.. It sounds like there may be better ways to accomplish what you want.. I need to turn in though.. I have attached a file showing all that we've discussed so far. I've created a mechanism to allow you to easily add unrelated contacts or remove related contacts from a service record. Service.fp7.zip Edited December 3, 2009 by Guest
Newbies Mysha Posted December 3, 2009 Author Newbies Posted December 3, 2009 Wow, that's impressive. Now i see how you had to turn things around. I'm going to look into your solution now..thank you very much for your help!! Mysha
Søren Dyhr Posted December 3, 2009 Posted December 3, 2009 There is however a logical flaw in agutlebens template, assigning a contact to a service, shouldn't remove him/her from another service if already assigned. --sd ServiceMod.zip
Recommended Posts
This topic is 5529 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