January 5, 201016 yr I'm very new to Filemaker, but up until now I have found the program quite intuitive. Here's my dilemma: I am trying to automate the process of adding contact info for artists when we create a new event (concert) There are two layouts involved the "events" layout which has details of the event including the artists, the time, the date, the program, tickets sold..etc. There is also an Artists Layout which gives the details of the artist:Contact Info, Myspace Page, Photos, etc. Here's what I'm trying to do. When an artist name is entered in the "headliner" field on the events layout, if the user clicks a button it will activate a script that creates a new record in the "artists" layout and the "group name" in that layout will have the text from the "headliner" field in it. Here's the script that I thought would work: Go to Layout ["Artists" (Artists")] New Record/Request Set Field [Artists::Group Name; Events::Headliner] When I run the script I get a New Record, but it's empty, "Group Name" doesn't show up... It's driving me crazy. Is there a relationship that has to be set up first, for this to work. I can make it work with copy and past, but I don't want to use those functions. Any insight would be much appreciated!
January 5, 201016 yr You need to capture the "Headliner" data before you create the new artist record if there is no relation between the tables: Set variable $headline with artist name Go to Layout ["Artists" (Artists")] New Record/Request Set Field [Artists::Group Name; $headline]
January 28, 201015 yr Although this works, it is very poor design because it relates tables using text values rather than unique numerical keys. Each Artist in the Artist table should have a unique numerical ID (an auto-enter number field, Artist_ID). An Event would have in its Headliner field, an Artist ID. I suppose each event has only one Headliner, but can have more than one Artist. Therefore, you need a table that stores the join between Events and Artists. In this table, you could mark a record as the Headliner. How are you determining if it's a new Artist to your system when you specify them as the Headliner? It seems that there's no check.
January 29, 201015 yr Author What you are saying makes sense. What I had done is set an autofill from the "artists" layout in the headliner field. I also have a script that when someone types a new artists name in the headliner field, an new window opens with the "artists" layout allowing the details of the artist to be entered. If someone doesn't spell the artists name correctly or leaves out a "the" there will be duplication, but I think that could happen even if I created a unique ID.
January 29, 201015 yr I typically have a user Find before they are allowed to create a New Record. Duplicates will still happen, but they're reduced.
Create an account or sign in to comment