Ian Murphy Posted October 2, 2006 Posted October 2, 2006 (edited) Still rusty on portals. I think these questions are pretty elementary, but they're beyond me and my Missing Manual. The db I'm developing is for a gallery, so includes contact information for artists and detailed entries for their works. 1. On the artist's rolodex entry, a portal shows a list of all works by that artist. A container field to the right of the portal wants to display the graphic included with the related record I'm clicking at the moment. Layout necessitates that the cotainer can't be inside the portal [to register, the repro needs to be 150 px tall]. It displays fine the graphic associated with the first record in my portal ... can I convince it to change? [The eventual effect, of course, wants to be He consigned ten paintings to us, this client is interested in the one that's a yellow & red abstract, which was that? ah, this one]. 2. More interesting, to me: I want the same portal to be accessible from each of the work pages. Jim has eight paintings - from each of those eight, I want a list of itsef and the other seven. What's hanging me up here is that I can't figure out what relationship the portal wants to see, since there's no related file at work ... I want to see entries for every record that shares a key criterion [artist] with this one. Isn't it more like a find or sort? Oh, straighten me out. ______________________________ Edited for this tiny addendum to #1. which I don't know whether it's helpful or not: the art is found by a unique serial which is also living on this layout, so if it's an effective workaround, it's easy for a tiny script to look in my related record for that serial and paste it in. Edited October 2, 2006 by Guest to add rambling explicative paragraph
Genx Posted October 2, 2006 Posted October 2, 2006 For #1, take a look at this sample file posted by Fenton: http://www.fmforums.com/forum/showpost.php?post/152408/ For #2, I assume each record of your artists have a primary key of some sort, and each of the paintings related to each of these artists are related by this primary key... In the same fashion then, you can relate the field that stores this key in your paintings(?) table to another TO, via the same field ie.. Paintings Relating to artists TO_Artists -- TO_Paintings Primary_ArtistID = Foreign_ArtistID Paintings by same artist as currently selected painting TO_Paintings -- TO_Paintings_Portal Foreign_ArtistID = Foreign_ArtistID At which point, in your layout based on the TO_Paintings table occurance, you create a portal based on the TO_Paintings_Portal thereby allowing you to view all those records that relate ie. all those paintings painted by the same artist identified by the artist ID... If any of this makes sense tell me because i've sort of been typing and yeh, it may not make a lot of sense so get back to me.
Ian Murphy Posted October 2, 2006 Author Posted October 2, 2006 I'm annoyed with myeslf, because I typed out an answer and evidently only hit "Preview," as it's not here. If I make any glaring leaps without logic, they might be because I "feel" that I already typed them. Curse me! Curse the Internet! ______________ I can see that you know ho wto do what I'm wondering about, but I admit I'm getting bollixed up trying to implement it, partly because I'm not following your use of "TO_" and "ForeignArtistID". The portal on the Artists page, showing me their artworks, works fine. Conceptually, I think I understand that I want to access that portal from the Artworks table, qualifying it that access with a relation tied to 'current Artist.' What I'm missing, though, is how that other relationship is expressed. There's no data stored inside the portal, so the relationship can't involve it ... so etc. Tahnks for volunteering to hold my hand. I need it. My brain is turning blue.
aldipalo Posted October 2, 2006 Posted October 2, 2006 I hope this is not to basic, but it sounds as though Portals and relationships are the question. TO = Table Occurrence as viewed through the relationship graph. Contact_ID_Key -> fk_Contact_ID_Key Usually a key field is an auto enter serial number field on the primary side and the related TO is set to allow creation of record on that side. What it sounds like you are looking to accomplish is to show similar records hence Genx is referring to: Paintings by same artist as currently selected painting TO_Paintings -- TO_Paintings_Portal Foreign_ArtistID = Foreign_ArtistID if you go to your relation graph and drag the Foreign_ArtistID on to itself it will create a second TO which Genx has suggested be named Paintings_Portal. Now when you use this portal on a layout you will get the other paintings for this Artist. See attached file for an example. Sales_Rep.zip
Ian Murphy Posted October 3, 2006 Author Posted October 3, 2006 Hey brilliant! I have to admit, my heart sank a bit when I read your posting [twice]. I still wasn't really sure I got what you were getting at. But your attached file was exactly the right example, and I followed its example and then, poof, like magic! I still need to get inside the theory here, of course, so I can do it again [and maintain it], but I admit I do always find it easier figuring ou thow something works than trying to determine how [and whether] it will. So thanks for the solution.
Recommended Posts
This topic is 6627 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