Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Alternate hightlight of rows by group


This topic is 6609 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi all,

I've search around for something like this - and I can't find an example... AND I can't figure out how to do it.

In a portal, I'd like to have alternating row highlights not by every other row, but every other occurrence of a field value.

For example, say I have a portal with 15 items listed. I'd like a container field with a alternating white/off white shade to fill in based on groups of records. In my 15 items, I have a number field. The portal is sorted by this field. If in these 15 items I have 5 different numbers - ie. I have 5 sets of items (3 records each) that have the same number, I'd like to have the portal display with the 1st set of numbers be white, the next off white, etc.

This will allow the user to quickly see like items separated by a color shade.

...Instead of just turning on the alt color check in the portal options dialog, you could specify a quick calc to alternate by the sorted value, or like values in a field.

I hope that makes sense. Anyone else doing this somehow? I hope I am not missing something obvious here. I am using FM 8.

Thanks for any help,

Jerremy

Posted

Since portal records don't really know about each other and where they fit in the portal, I think you'd need a script to loop through the portal records and set a flag to indicate which container graphic to use. Keep in mind that this would be problematic in a multi-user environment.

Another idea is to just use a different color graphic for each group, using a Group table as the source of the graphic.

Posted

Hi comment,

Thanks for your help. I was able to adapt what you had in your demo file to my system.

...Still not 100% sure how it's working (which will bug me until I figure it out), but it is doing exactly what I was looking for.

Instead of a text result, I changed the calc to a container field and it grabs a color from a global.

I did not have to make any other relationships and I did not have to add any predetermined values in the value list.

Thanks for your help and time. If you have another moment, could you give a quick how-to on how it functions?

Thanks again! This is a great visual tool in a big portal list.

Jerremy

Posted

First, you need a value list using only related values from the field in Siblings, as seen from Child.

Then you calculate the position of the child's value in the list. Then, if the position is even, you hilight.

Note that this works only if the portal is sorted alphabetically/numerically - because the referenced value list is always sorted so. The custom value list is non-essential here - I used it only to poulate the demo records.

Posted

Hi again comment,

Excellent. Thanks for taking the time to explain.

As I said, this a perfect visual separation of records in a portal.

Very helpful!

Thanks again,

Jerremy

This topic is 6609 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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