Hiyas!
Am currently using a mini VB script to color some items' backgrounds based on field values. The problem is that when I move them to become children, the field value I am basing this on is erased, so I would have to check whether the item's parent has that field value set (the items in question will only ever be demoted to second level so I'd only have to go up one level with the parent check).
How can I do that, please?
Here is the code I'm currently using:
Function CalendarColor(ItemColor, ItemIsRecurring, ItemInCalendar, A_Action)
' sets different background colors based on item attributes
If(InStr(ItemText, "* ") = 0) Then ' birthday event starting with asterisk + space
CalendarColor = "&HFFFF00"
ElseIf(A_Action AND ItemInCalendar) Then
CalendarColor = "&H004000"
ElseIf(ItemIsRecurring and ItemColor = "") Then
CalendarColor = "&H680000"
ElseIf(NOT(A_Action OR ItemIsRecurring)) Then
CalendarColor = ""
End If
End Function
What I'd require is something like "Parent(Item) is in A_Action". I hope it's doable somehow.
Many thanks!
Comments
Hi Left, Parents values is…
Hi Left,
Parents values is not accessible to child items. Can you explain what values you'd need and why moving an item to be a child needs to remove these values
Pierre_Admin
IQ Designer
Good question. It made me…
Good question.
It made me remember that there is a setting I can access through the Manage Grids dialog: "Keep source field values when dragging out or demoting TLI". My problem is that I want my main GTD-inspired grids to be mutually exclusive, i. e. an item that is inside the Action grid, should never have the Pending attribute at the same time. Hence, I have the above setting disabled by default because I don't want the values to be kept when dragging items between these two grids (and some others).
However, I wouldn't mind the setting being kept when demoting a TLI. In fact, if I there were two separate settings, one for dragging out and one for demoting, my problem would be solved. But unless you could undertake splitting the setting, I wonder if I can find a workaround to somehow preserve TLI grid values when demoting (I need level 2 only, not further down, in case that'll make things easier) while not keeping values when dragging items around between mutually exclusive grids.
Perhaps I need to use auto-assign rules for those grids?
Thanks!