Jerremy Posted October 20, 2006 Posted October 20, 2006 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
Ender Posted October 20, 2006 Posted October 20, 2006 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.
comment Posted October 20, 2006 Posted October 20, 2006 portal records don't really know about each other and where they fit in the portal But they can be told. Though I am not sure the result is worth the amount of resources required - a relationship, a value list and a calculation field. HighliteAltCategory.fp7.zip
Ender Posted October 20, 2006 Posted October 20, 2006 Well, I can't say I get it, but it looks pretty!
comment Posted October 20, 2006 Posted October 20, 2006 It's not Greek - though I suppose it can take more than 5 minutes to grok. (Maybe it would look prettier if I put it under glass...)
Jerremy Posted October 20, 2006 Author Posted October 20, 2006 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
comment Posted October 20, 2006 Posted October 20, 2006 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.
Jerremy Posted October 20, 2006 Author Posted October 20, 2006 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now