How can I Auto-Color grid items depending on their heirarchy?
Parent
Child
Grandchild
Child
Grandchild
Grandchild
I want to have the items automatically back-colored when I enter an item.
Can someone point me to how to do it?
Fair winds,
Calvin
Comments
It might be possible, but I wouldn't know how to do it as I'm not aware of any "level identifier" field. You could use the itemparent and itemgparent field, and do something like (if you're a bit familiar with vb) -- but this would only be limited to the first 3 levels:
1- go to the vb script editor (view>VBscript) 2- from the system code, copy the CalcColor Function 3- open the "This database" or "user" tab (you might want to extend the function to all your database, or not...) and paste the code in there. User or This database codes have priority over System code. 4- Modify the user code to something like :
Function CalcColor(Urgency,itemParent,itemGParent,item) ' calculation of the itemcolor color code based on the Urgency level
if isnull(Urgency) then CalcColor = "" else if Urgency < -10 then CalcColor="" elseif Urgency <=-3 then CalcColor="Yellow" elseif Urgency < 0 then CalcColor="Blue" elseif Urgency <=5 then CalcColor="Purple" else CalcColor="Red" end if
end if
'careful : lines order is important as it determines colour priority -- urgency won't recolor items that obey rules below... You might want to do the reverse though as Urgency would never have an effect beyond the 3rd level. 'Lines below gives a different color depending on itemparent, and itemGparent fields.
if isnull(itemParent) then CalcColor = "Green"
elseif itemParent <> "" then CalcColor = "red"
elseif itemGparent <> "" then CalcColor = "Yellow"
end if
End Function
Then in the itemColor field, don't forget to write in the equation textbox (in the field management dialog) : =CalcColor(Urgency,itemParent,itemGParent,item) The problem is that this function only has an effect when there's something in the item field. And it stops after the 3rd level
>>It might be possible, but I wouldn't know how to do it as I'm not aware of any "level identifier" field. You could use the itemparent and itemgparent field, and do something like (if you're a bit familiar with vb) -- but this would only be limited to the first 3 levels:<<
I think any equation is going to apply itemwide. So any coloring would be based on the Item's primary parent and grandparent, not on its contextual parent and grandparent. If the item has another parent, its color there won't match that of its siblings.
The Item's "indent level" in a particular context can be determined from the "#" field. I don't know if we have programmatic access to this field. But even if we do, to use it in the equation would still set the Item to a color that would be wrong in other contexts.
So the solution will probably have to live in Grid Properties rather than Item Properties. For any grid, IQ could allow us to set colors for Level 1 through Level 10 as a display option along with indentation. That would actually be quite a useful enhancement for narrative material, where we might want to hide, reveal, and easily identify levels, but where indentation detracts from usability.
So the solution will probably have to live in Grid Properties rather than Item Properties. For any grid, IQ could allow us to set colors for Level 1 through Level 10 as a display option along with indentation. That would actually be quite a useful enhancement for narrative material, where we might want to hide, reveal, and easily identify levels, but where indentation detracts from usability.
Jerome
[/quote]
Yes! Grid-Level would be the ticket for my purposes of what I was thinking. That would even allow different color schemes for different grids, which could serve to allow yet another level of organization.
Yes, Jerome is right. This workaround -- it really is a workaround... -- would only work for some items used only in the context of 1 grid, with only one parent each, etc.
You'd need another solution -- grid level...
Jerome : [quote]That would actually be quite a useful enhancement for narrative material, where we might want to hide, reveal, and easily identify levels, but where indentation detracts from usability.[/quote]
Speaking of narrative material, I use some specific color coding for that based on keywords and other boolean fields. It already works very well. A "grid level" coloring wouldn't work that well in my case because of its rigidity -- I suppose.
...A "grid level" coloring wouldn't work that well in my case because of its rigidity -- I suppose.
[/quote]
Hi Armando, perhaps it would help if I told you the purpose would be to have a hierarchy grid (projects?) that would allow the background color to change automatically as items were indented/outdented as required. Result: Instant recognition, especially for those of us that have visual difficulty "seeing" the depths of children, grandchildren, etc.
Yes, I fully understand. I use colors a lot, but I prefer to have flexibility in the way I distribute colors in the outline -- e.g. : only titles get colored, not content. For that I use diverse simple strategy based on field data.
I think that Outline Styles is more what you want here. Planned (to be similar to Ecco's) but not yet implemented.
[/quote]
Hi Pierre,
Unfortunately, any references to Ecco are wasted on me. I have never even seen ecco and the only thing I know about it is that is/was a very good outliner. I will attempt to familiarize myself with Ecco via screenshots, etc., if possible. If www.ecco.com is not its home, anyone please advise.
If what you mean by "Outline Styles" is the ability to create our own color schema for an outline (similar to the original post above), then I think we are on the same page. I realize I can color any item any color I want, but I am looking to automate my intent. Hey, that's what 'puters are for, eh!
Calvin: I, too, have some items color coded automatically but it's based on function rather than outline level.
I assume having an outline already tells me something about each item. However, I can't collect all 'yellow' items from different TLI's -- if that's your need. Otherwise, I'm not sure what the advantage is to coloring different levels. This is in no way a criticism, only an ignorant observation on my part.
But in my case of color usage -- for example -- if I call & leave a msg for someone, it becomes a pending item & is colored yellow automatically & automatically ends up in a GTD grid view
Different criteria but same idea for Follow up's & priority items etc.
I find this use of color more practical because I can assign to any item @ any level in in any view @ any time
I think Pierre's reference to EccoPro is probably something like allowing the user to select different outlining formats. Example:
I
A
1
a
A
a
i
ii
etc. Not exactly color but each level has a different designation according to user choice
Comments
1- go to the vb script editor (view>VBscript)
2- from the system code, copy the CalcColor Function
3- open the "This database" or "user" tab (you might want to extend the function to all your database, or not...) and paste the code in there. User or This database codes have priority over System code.
4- Modify the user code to something like :
Function CalcColor(Urgency,itemParent,itemGParent,item) ' calculation of the itemcolor color code based on the Urgency level
if isnull(Urgency) then
CalcColor = ""
else
if Urgency < -10 then
CalcColor=""
elseif Urgency <=-3 then CalcColor="Yellow"
elseif Urgency < 0 then CalcColor="Blue"
elseif Urgency <=5 then CalcColor="Purple"
else CalcColor="Red"
end if
end if
'careful : lines order is important as it determines colour priority -- urgency won't recolor items that obey rules below... You might want to do the reverse though as Urgency would never have an effect beyond the 3rd level.
'Lines below gives a different color depending on itemparent, and itemGparent fields.
if isnull(itemParent) then
CalcColor = "Green"
elseif itemParent <> "" then
CalcColor = "red"
elseif itemGparent <> "" then
CalcColor = "Yellow"
end if
End Function
Then in the itemColor field, don't forget to write in the equation textbox (in the field management dialog) : =CalcColor(Urgency,itemParent,itemGParent,item)
The problem is that this function only has an effect when there's something in the item field. And it stops after the 3rd level
I'm sure Pierre has a better solution... :)
I think any equation is going to apply itemwide. So any coloring would be based on the Item's primary parent and grandparent, not on its contextual parent and grandparent. If the item has another parent, its color there won't match that of its siblings.