innodat Posted September 10, 2008 Posted September 10, 2008 I've been working on getting all my scripts for basic search, sort and navigational functionality "portable", so that they work on any given layout in my solution. I've succeeded, with the exception of portals which still create a huge overhead in programing time. I got stuck quickly, when I realized that there's no way to go to a related record by calculation. Otherwise, I could maybe use object names to indicate what portal I'm in, and where FileMaker should go. Does anyone have an idea how this could be accomplished? It's just about the basic functionality: add record, delete record, go to related record. Thanks!!
David Jondreau Posted September 10, 2008 Posted September 10, 2008 Send the base table name and record PK as script parameters and perform a find rather than a GTRR?
innodat Posted September 11, 2008 Author Posted September 11, 2008 That's interesting. I didn't think of that... However, I think this would send the PK of the base table and display all related records. There's going to be many related records with the same primary key. How could I get it to go to the very record I'm clicking on in the portal? Or am I thinking wrong?
David Jondreau Posted September 11, 2008 Posted September 11, 2008 A PK by definition is unique to a record. You question really depends on the specifics of you file and your goals.
innodat Posted September 11, 2008 Author Posted September 11, 2008 I understand the PK is unique, but am I not getting the PK of the record in the Base Table I'm browsing, as opposed to the PK of the record in the related table? Without "going to related record", how am I going to get the PK of the related record?
David Jondreau Posted September 11, 2008 Posted September 11, 2008 I'm assuming that a user is supposed to click on a portal record and that brings the user to the layout of the related table with that record showing; that a button is attached to the portal record. The portal record is aware of itself, including its PK. Set the script parameter to relatedTable::PrimaryKey.
mr_vodka Posted September 11, 2008 Posted September 11, 2008 Your related child records should have their own PK. Pass that PK as a parameter and perform the find in the child table.
innodat Posted September 11, 2008 Author Posted September 11, 2008 I wasn't aware of that (that the record in the portal is aware of itself) - fantastic, I'll put it into action. Thank you for all your help!
Recommended Posts
This topic is 5918 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