ukbased Posted August 11, 2006 Posted August 11, 2006 Hello,a beginner here . I have portal showing customer/invoice no./order no. I want to be able to click on a specific order no, and that will allow me to bring up all records showing same order number. thanks preferably put it in another portal buy opening a layout would be acceptable
K1200 Posted August 11, 2006 Posted August 11, 2006 A very easy way is to place a button on the portal row and have it Go To Related Record (using Show Only Related Records and Match Current options). Specify a separate layout (with an appropriate portal) and have that second layout Show Records From the same table that your first portal does.
ukbased Posted August 11, 2006 Author Posted August 11, 2006 hello thanks for reply. Do i just place the button in any row or does it need to be on one that relates to the recored ? reason i ask is the record in question may not always be in the same row. And i then script it as normal to open up the new layout ?
Lee Smith Posted August 11, 2006 Posted August 11, 2006 It's called Go To Related Record (GTRR for short), Do a search for your keywords [color:blue]+Button +Portal and you should find plenty of threads on this subject. You will also find some helpful reading about Relationships in your Manual and in the Online Help (available when FileMaker is open). Start by reading the information about the Script Step Go To Related Record, using this link in the help [color:blue]Contents > Script steps reference (alphabetical list) > Navigation script steps > Go to Related Record script step Lee
ukbased Posted August 11, 2006 Author Posted August 11, 2006 hello I have it working sort off .. new layout with portal showing relevant fields , button set to display only related records but when clicked there are still other records showing as well as the required ones I could not find anything related to match current options as earlier mentioned
K1200 Posted August 12, 2006 Posted August 12, 2006 Just place a button inside the field definition area of the portal (alongside another field -- or you can define one of the fields to be a button if that would work better for your application). Then define the button to perform the GTRR. No script is necessary unless you need it for other reasons. The GTRR brings up the second layout. The Match Records options are on the GTRR setup "Specify" dialog.
ukbased Posted August 12, 2006 Author Posted August 12, 2006 hello again, I have the button opening the new layout ok and the portal is in there displaying the data all that is wrong is ther is unwanted listings in there too I hit the initial specify button and it opens go to related options screen I enter the get related record box and fill in show records using ok I have tried both settings re show in new window including using that specify button which opens new windows options and then used specify again to see if match records was in there no success sorry to be a pain in the butt jack
K1200 Posted August 12, 2006 Posted August 12, 2006 If all is set up properly -- and GTRR is still resulting in more records than you expect to see -- then somehow those records are related. So the problem is probably with relationships and not the layouts. You might try building yourself a very simple file to test with until you get this basic mechanism working. As Lee suggested, there are sample files in various places in these forums. However, sometimes it is difficult to isolate some of the very basic constructs with so many FileMaker features available and utilized.
Lee Smith Posted August 12, 2006 Posted August 12, 2006 Post a copy of your file, and we'll take a look.
ukbased Posted August 12, 2006 Author Posted August 12, 2006 hello, this is what i have tried i.m looking to only display the records sharing the same order number thanks testing.fp7.zip
K1200 Posted August 12, 2006 Posted August 12, 2006 Here's a way to do what I believe you're after. I reworked your layouts a bit. I've found it's usually best to have a base layout for each defined table where you can always go to view only what's in that table. There are two excellent example files somewhere on the forum that you'll want to study to really get a handle on these relationships: JoinDemo.fp7 and SelfJoins.fp7. Essentially, what I've put together is shown by the MatchAll case from SelfJoins.fp7 testingRev.fp7.ZIP
ukbased Posted August 12, 2006 Author Posted August 12, 2006 hello thank you that is exactly what i need regards jacky was it linking the tables to each other that caused the problem?
K1200 Posted August 12, 2006 Posted August 12, 2006 It was with the details of the linkage. The Matching table is just a data view that says "show all records that match my current selected record, based on two specific fields". It's just one example of what self joins may be used for.
ukbased Posted August 12, 2006 Author Posted August 12, 2006 hi again one last question i hope . I,m going to put the demo into the real program but cannot see how you got matched table into the relationship with creating a table that shows in tables ? Where is this created ? thanks
ukbased Posted August 12, 2006 Author Posted August 12, 2006 sorry there is a typo in last message should read without not with.
Lee Smith Posted August 12, 2006 Posted August 12, 2006 Use the Edit Button when needing to change your post. Lee
K1200 Posted August 12, 2006 Posted August 12, 2006 Actually, I only modified the date2 table you already had in your example. But to create a duplicate table occurrence (in 8.0 anyway) first click on the table on the relationships graph, then use the "green plus sign" button. Establish the two relationships and it's ready to use.
Recommended Posts
This topic is 6678 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