Jump to content
Sign in to follow this  

Portal Row Highlight

Recommended Posts

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...

Share this post

Link to post
Share on other sites

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').

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Lee Smith 
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.