ldebondt Posted August 18, 2002 Posted August 18, 2002 I have a layout with 2 different portals. In portal "A" I want to select specific row to show information in portal "B". I can get this to happen however the row in portal "A" that I select should remain hightlighted. Have seen post in the past covering this but am unable to locate. Any help would be appreciated...
CobaltSky Posted August 18, 2002 Posted August 18, 2002 Hello Larry, Here is a method you might like to consider for highlightinf portal rows in PortalA, and viewing corresponding records in PortalB. It involves a number of steps, as follows: 1. Create two global text fields in your main file called 'gCurrentA', 'gCurrentB' and a global container called 'gHighlight'. 2. In layout mode, make a small square with no borders and filled with a color suitable for highlighting your portal rows (eg pale gray). Then copy it and, in browse mode, paste it into the 'gHighlight' container field. 3. From within the file which Portal A links to, create a relationship back to the main file (let's call it 'main', plus a calculating field called 'PortalHighlight' with a result type defined as container, with a formula along the lines of "Case(PortalAkeyField = main::gCurrentA, main::gHighlight". 4. Place an additional field within your Portal A in the main file, link it to PortalA::PortalHighlight, size it to fill the whole portal row, go into the "Format Field..." dialog and turn off 'Allow Entry into field' and place it behind the other fields in the portal row. Then call up the 'Graphic format...' dialog, select "enlarge image to fit frame" and turn off the "maintain proportions" option. 5. Create a script which runs as follows: Set Field ["gCurrentA", "PortalA::PortalAkeyField"] Set Field ["gCurrentB", "PortalA::PortalBkeyField"] ...and link the 'PortalHighlight' field in PortalA to it via the "Specify Button..." dialog. 6. Modify the relationship which is the basis of Portal B, so that it uses gCurrentB as its key field in the main file. 7. Remove gCurrentA', 'gCurrentB' and 'gHighlight' from the layout(s) in your main file. That's it, now when you click on a row in portalA, it will become highlighted (and remain so until you click on a different row), and the records which display in PortalB will be those that relate to the highlighted record in PortalA (as defined by the key field which the script transferred to 'gCurrentB').
Recommended Posts
This topic is 8134 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