June 3, 200322 yr I have a portal that lists out the related items the record of the particular database is related to. When they click on a record in the portal I want to bring to front the database that actually contains the records in the portal. So in my script I have: Go to Portal Row ["Summary_::recordID"] Perform Script ["Sub-scripts, External: "LettersInv_"] and the External Perform Script in the LettersInv_ table simply toggles the window to zoom and sets the zoom level to 100%. The problem is the record that is being shown is always the first one and not the actual record. This seems very simple and I can't seem to figure it out. Thanks.
June 3, 200322 yr Change : Go to Portal Row ["Summary_::recordID"] To Go to related records[your relationship - show only]
June 3, 200322 yr Author Now if I wanted to display the record selected from the portal onto a different layout in the same database (not the database the contains the records from the portal). Do I use "Go To Related Records"? I tried using this script step along with a "Go To Layout" script step to go to the layout that will display the selected record from the portal and I always seem to get the first item from the portal. What script step is needed and what type of items do I need in the layout? Do I still need a portal that contains the fields or can I just use the field that shows the corresponding field. Thanks.
June 3, 200322 yr Hi, This is a different technique but you still need the GTRR step. In addition, you'll need to store the related record_ID in a global field in the related db, and "paste" it into a text field in the Main db (could also be a global field). The the script will GTRR ----- Perform External (set g_record_ID, Record_ID) Set Field (t_record_ID, Related::g_Record_ID) Go to Layout (new layout in Main) Next, you'll drop new related fields in the layout using a new relationship called "Temporary Relationship" Main:t_record_ID::Related::Record_ID. Going to another record in the Main within the same layout would show related records from the previous record if you had used a global field. That 's the reason why you'd probably prefer a text (or num) field instead of a global...
June 3, 200322 yr Author Ok let me see if I understand this: With the database that is shown in the portal, in this case "LetterInv_" I need to create a global field (text) and set this to the value of the RecordID that was clicked on in the portal. Then in the database that contains/displays the portal, in this case "LetterAccnt_" I set a text field with the value of the global text field found in the database, "LetterInv_" (which was recently set in the step above). Finally in the layout, I create fields that defined based on the new relationship "Temporary relationship" which in this case is LetterAcct_:t_record_ID::LetterInv:record_id. Funny thing is I drag a set of fields onto the new layout and define it with the new relationship that should display the fields of the "LetterInv_" but I get no value being shown for any of the fields. Did miss a step? My original relationship design is: The LetterAcct_ and LetterInv has a one to many relationship where 1 record in LetterAcct_ can have many records in LetterInv_. Thanks.
June 3, 200322 yr Hi Macaroni, My latest sampler "OSX Portal Look" does show how to do this BTW... My original relationship design is: The LetterAcct_ and LetterInv has a one to many relationship where 1 record in LetterAcct_ can have many records in LetterInv_. Working with a Join File then .... What would be the Record_ID extracted from this Join File ? In a join file, you probably have 3 unique Ids Call them : Record_ID1 which was brought from Related1.fp5 RelatedRecord_ID2 which was brought from Main.fp5 Join_ID from Join File.fp5 Then, your relationship could also be set from : the Main to Related1.fp5 Am I confusing you ? Looking at a concrete example. An Invoice may have related records in a Join File. The Join File has fields Product_ID, Make_ID, Sellor_ID... All these Ids could be used as the "Temporary key", Therefore, the relationship could be : t_record_ID::Product.fp5:Product_ID t_record_ID::Make.fp5:Make_ID t_record_ID::Vendors.fp5:Vendor_ID
June 16, 200322 yr Author A little late on the reply. Thanks for the tips. It worked as you suggested and after studying your OS X Portal Sample File it works as you said. The reason I didn't get it to work the first go around was because I had mistakenly assigned a wrong relationship. After make the quick change, it worked as you said. Thanks again. Your OS X Portal is way COOL!!!
Create an account or sign in to comment