keelbolt Posted February 6, 2009 Posted February 6, 2009 I hope this is in the correct forum. I am new to FM Pro. I am building a relational database, and in one layout I have a portal showing the document records related to a client ID number. The portal can show up to ten document records, and each document record in the portal begins with a field showing the unique document ID number. I would like to define a script where, in browse mode, the user clicks on the document ID field in the portal and the script finds that record number. I presume that I can use an 'OnObjectEnter' script trigger for this, but cannot work out how the script can read the unique ID number contained in the field that is being clicked on. Anyone offer any help?
aldipalo Posted February 6, 2009 Posted February 6, 2009 Have you tried GTRR "Go To Related Record" script step? You can just set the DocumentID field as a button with the GTRR and it will take the user there. hth
Colin Keefe Posted February 6, 2009 Posted February 6, 2009 In other words, you don't need a script trigger to do this, since a user click on an object defined as a button will run the script assigned in the Button Setup... dialog. Just right click on your ID field, select Button Setup... and assign a Go to Related Records script step, with a specified relationship and target layout.
keelbolt Posted February 6, 2009 Author Posted February 6, 2009 Thanks. That's great. I have managed to define the field as a button, but I am stuck on the Go To Related Record Script. Perhaps I need to read more - I have tried the Filemaker help - but I would really appreciate a little more explanation on the script.
aldipalo Posted February 8, 2009 Posted February 8, 2009 See if this helps. Look at the button setup and then click specify. If you still have questions let us know. GTRR_Test.zip
keelbolt Posted February 9, 2009 Author Posted February 9, 2009 Hi Aldipalo Thanks very much indeed for taking the time and trouble to produce such a clear example. I can now see exactly how it works. As a result, I have identified some problems in my own work: firstly, I had specified 'text' rather than 'number' for the serial and ID numbers, thinking that I didn't want to do calculations with them so they must be text. I still can't get my own Dbase to work like your example, so I still need to find out where I have gone wrong. But now I can see how it 'should' work, I've got a good lead.
aldipalo Posted February 9, 2009 Posted February 9, 2009 First, I would suggest you do a little reading before getting to deep in to your database design. Poor structure has a way of coming back and kicking you. Go here: http://www.foundationdbs.com/downloads.html and read 'White Paper for beginners and database design.' They are 2 well written articles that will help you tremendously. Second, if you'd like, post a clone of your file with a few bogus records and we'll take a look at it for you.
keelbolt Posted February 9, 2009 Author Posted February 9, 2009 Once again, thank you most warmly. I will read the two documents suggested, make any changes that I think need to be made to the database as a result of that learning, then, if I may, I will take you up on your offer and post a clone of the db for your comment. KB
keelbolt Posted February 12, 2009 Author Posted February 12, 2009 (edited) I have read the two papers, and have made a number of changes as a result. Here is a clone of the database and I would be most grateful for any comments and/or suggestions. Attachment in private topic. KB Edited February 13, 2009 by Guest
Recommended Posts
This topic is 5823 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