April 12, 200817 yr (Sorry, I couldn't come up with a better subject line.) I'm still trying to create a DVD rental system using FileMaker. Please, don't get hung up on the general structure of the tables and their relationship, unless it disallows me to do what I want. I have two tables, Customers and Movies, which are related through the table Rentals. Rentals is another table which keeps track of the movie ID number, the customer ID number, and rental dates. Now I want to create a simple (at least it should be) layout which will allow the user to search the Movies table for a movie name and the Customers table for a customer name and take the related movie ID and customer ID to create a new record in the Rentals table. How do I do that?
April 12, 200817 yr I made a similar solution for a video rental store... What I did is the following: - New Rental (button) -> creates a new rental entry (this you probably have already). - Then next to the 'Member_ID' field I placed a button which opened a new 700 x 300 pixel window. - The new window listed all members and their IDs and a search possibility. - I hade a rect drawn over the entire record which was a button (in browse mode all fields must be blocked). - The button had a script which: .......... Copy 'Member_ID' from the search result .......... Close current window .......... Paste 'Member_ID' into the related table on the rental entry layout. Very easy solution. Let me know if you understood my explanation ;-).
April 12, 200817 yr Author I think I do understand your solution, but I'm pretty sad that there is no simpler solution than that. :
April 12, 200817 yr I don't see how it could be any simpler. You're going to have to choose the other one from whichever one you're on. A dedicated layout is required for a choice, because of the button to add a Rental. I would recommend using global fields, or script Variables to pass the values. Copy/paste is not the best way to pass data, and is very seldom necessary.
April 12, 200817 yr You can also do a "Set field" instead of the copy-paste method. So when clicking on the button the script does: - Set field 'rental::member_id' to 'member::member_id' - Close window - Goto field etc. (this way the related data shows right away) Besides that, you can also do a pop-up list where the value list is 'member::member_id'. But if you have a lot members, the list gets very long.
Create an account or sign in to comment