Jump to content
Sign in to follow this  
Lee J

Highlight a portal Row

Recommended Posts

I have the Portal List on the left side of my layout and the related Data is shown to the Right

To make life easier for my users I would like to keep the selected Portal row highlighted.

How can this be achieved?

Thanks in advance.

Share this post


Link to post
Share on other sites

Go into layout mode in the database that the portal looks into and create a square of color that is the color you would like the portal row highlight color to be. Make sure that the border of the square is the same color as the fill. Copy this square and create a global container field and paste the color into the field in browse mode. I'll call this field gHighlight.

Create a number field called Is_Selected. Create a container calculation called Is_Highlighted with the following equation:

Case(

Share this post


Link to post
Share on other sites

Wow, Chuck you have a big brain.

How would you go about modifying that operation so that a portal row is permanently hilighted once a condition is met, such as a radio button being selected or a value in a certain field being set?

Can something similar be done in a list of records that display "List View" from the layout setup, as opposed to using a portal? I'm somewhat portal-shy.

Share this post


Link to post
Share on other sites

Calculation fields can have the type "container" as a result. Say you have two container fields ContRed and ContGreen filled with red and green colors. If you wish to display a red or green background in a record based upon another non-container field say "Status". The calculated container can be:

BkgdContanier (calculation, container) =

Case(Status = "Go", ContGreen, Status = "Stop", ContRed, "")

If you were viewing records in this file via a portal in another file, this container could be used in the background of a portal row to display the row as red or green based upon the contents of the field "Status".

-bd

Share this post


Link to post
Share on other sites

Excellent, it works a treat I to share similar views "Portal Shy", however I just think they need a little more planning before you dive in.

Cheers once again.

Share this post


Link to post
Share on other sites

Sorry to cover old ground, but I have just got around to implementing the highlight function (hasn't been a priority) but it only works on the Top item in the Portal window.

I don't run any sort option in the portal so what can the problem be.

stumped

Share this post


Link to post
Share on other sites

Now when you click a portal row, it will run the script that sets all of the related records to be unselected, and then sets the currently clicked portal row to selected, and shows this by having the color in the Is_Highlighted field show up.<P>Chuck

Chuck, will this work if I want to show the currently clicked on record in a self-join portal? Anything different to do in that scenario?:(

Share this post


Link to post
Share on other sites

Chuck,

I tried the technique above on a self-join portal, and everything is working except the script step that says "Set Field [PortalRelationship::Is_Selected, 1]". No matter which record I click in the portal, it sets the FIRST record in the portal with the Is_Selected=1, and hence the gHighlight color is showing behind the FIRST portal row, and NOT the row I clicked on!

Any suggestions?

Share this post


Link to post
Share on other sites

I was having trouble following your post on highlighting a portal row (the first one). Where does the white rectangle go? Can you provide an example of how this is supposed to work?

Greg

Share this post


Link to post
Share on other sites

I was having trouble following your post on highlighting a portal row (the first one). Where does the white rectangle go? Can you provide an example of how this is supposed to work?

Greg

Share this post


Link to post
Share on other sites

I was having trouble following your post on highlighting a portal row (the first one). Where does the white rectangle go? Can you provide an example of how this is supposed to work?

Greg

Share this post


Link to post
Share on other sites

Hi Greg,

The solutions discussed in this and your other post are for versions prior to 7. I don't recall this subject coming up in regards to v7, and I'm a newbee to v7 to boot. It may be worth your efforts to create your own Thread (new post) asking your question. Be sure to point out what you are wanting to accomplish, and what versions and platform you are needing this for if different than the one in your profile.

HTH

Lee

cool.gif

Share this post


Link to post
Share on other sites

Hi Greg,

The solutions discussed in this and your other post are for versions prior to 7. I don't recall this subject coming up in regards to v7, and I'm a newbee to v7 to boot. It may be worth your efforts to create your own Thread (new post) asking your question. Be sure to point out what you are wanting to accomplish, and what versions and platform you are needing this for if different than the one in your profile.

HTH

Lee

cool.gif

Share this post


Link to post
Share on other sites

Hi Greg,

The solutions discussed in this and your other post are for versions prior to 7. I don't recall this subject coming up in regards to v7, and I'm a newbee to v7 to boot. It may be worth your efforts to create your own Thread (new post) asking your question. Be sure to point out what you are wanting to accomplish, and what versions and platform you are needing this for if different than the one in your profile.

HTH

Lee

cool.gif

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.

Guest
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  

×
×
  • Create New...

Important Information

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