stefangs Posted January 8, 2003 Posted January 8, 2003 This is going to be tough to explain, but here it goes... I'm working on a system for tracking music performances for several artists. Among others, I have the following files: 1. artists 2. performances (by the artists) 3. songs (a pool for each artist) 4. setlists (a subset of the pool of songs by an artist from a specific performance) My question involves the use of recordID numbers. Songs are linked to artists by an artistID, but also have a unique ID. I then concatenate these two ID into yet another (unsightly long) ID which I want to use for portal filtering later. To get all these IDs right, I'm scripting the creation of songs records from a portal in the artists file. The purpose of these IDs is so I can link any song both to a specific artist and to a specific performance/setlist. A second layout in the artists file has a portal to the performances file. A performance record inherits the normal artistID. When viewing a performance in its own file and layout, there is a now a portal which points to the setlists file. This is where I want only relevant songs records to show up for entry in the portal. In this portal I now have a popup lists for the songs. Click in the songs field, and a list pops up with only relevant records. The list shows the ugly long ID first, followed by the actual song name (with the 'also show names of' option in the value list). I'm sorting the value list by the song name, hoping I can type the first letters of the song to navigate the list, but this is what doesn't work. Whatever letter I type, it jumps to the end of the list. I know it must be because the value list is from the songs file and not from setlists, but I don't see how I can do it properly. Hope this makes sense and thank you for any help.
Ugo DI LUCA Posted January 8, 2003 Posted January 8, 2003 find a place in your layout and insert another portal that would show the list of songs from Song.fp5. Create a calc field called cFilterSongsName = Left (SongsName,1) & "P" & Left (SongsName,2) & "P" & Left (SongsName,3) & "P" & Left (SongsName,4) & "P" & Left (SongsName,5) & "P" & Left (SongsName,6) & "P" & Left (SongsName,7) & "P" & Songs Name & "P" & "-All-" Then create in main file a field called gSongsNameFilter and create a relation with songs file as gSongsNameFilter::cFilterSongsName. Put the gfield ahead of the portal. Then, when you will type C in the gSongsNameFilter, it will only show the songs starting with C, Ca only those strating with Ca... Use 2 buttons close to the gfield : - one with "search" that runs no script but that allow the user to refresh the portal by clicking out of the field. - one with "Show All" with script settong gSongsNameFilter to "-All-" and run Exit Record/Request This is a type ahead portal I love to use. Comes from Bob Bowers and Chris Moyer book. I just posted a file in File Maker Theory with a type ahead portal in it. Please don't look at the ugly interface. Go into Contacts2.fp5, click in the "professional" header button and click the + button. A message asks "Does this operator already exists" - Click Yes and you will see the type-ahead portal showing...
stefangs Posted January 10, 2003 Author Posted January 10, 2003 thanks for replying - i can't find that file though. i've looked at the samples section and in 'relational database theory'. sorry - can you tell me where it is please?
Ugo DI LUCA Posted January 10, 2003 Posted January 10, 2003 thread is named "Contact File Advice needed". Use second attachment and once again do not look to the interface nor the scripting process. It is a total mess. I could't post it in samples thread for that....
stefangs Posted January 10, 2003 Author Posted January 10, 2003 sorry to be such a pest, but i just ran a search on "Contact File Advice needed" and it only returned this thread :-( which section is that or perhaps it has it run off the date range? can you repost the file here? thanks!
Ugo DI LUCA Posted January 10, 2003 Posted January 10, 2003 Don't be sorry, it wasn't contatc but "contacts". I just tested the download and it seems the Global file for the tab is not working anymore. If you want, I can mail you the copy for this.
stefangs Posted January 17, 2003 Author Posted January 17, 2003 Thanks for your patience - now I get the idea. However, it's not really what I want. I think my topic name may have been misleading too. Your suggestion filters the portal by the first letters typed. But what I really want is to filter the list that pops up when an entry is made into the portal, i.e. when you click in a field in the portal. So I'm in the performances file (a child of the artist file) and I'm looking at a portal which points to the setlists file. When collecting the songs for the setlist, I click in the next available portal row and get a popup list which should be comprised of only those songs which are relevant to the artist. So the filtering is actually done in the popup list already. That much I have actually working, but now I can't navigate this list by typing the first few letters, even though the value list is sorted by the second field which shows the name (the first value is the songID and that gets entered while the name field is overlayed on top). Hope this makes sense.
Ugo DI LUCA Posted January 18, 2003 Posted January 18, 2003 one way you could perform thos is making a calculation in the parent file equal to "song name" & "songid" and use this value to popup. This way, you would have the list shown sorted by the song value, and you could navigate through the list. Do not know if this help as you would have to modify your relationkey if you were to "create new record from portal" using the song id.
Recommended Posts
This topic is 8051 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