Submitted by ThomR on 2010/06/15 14:32
Hi all. I'm curious if there's a way, or any additional interest apart from mine in a way, to qualify a field so that it is upwardly inheritable. My particular wish is to have it that when a box is checked for a given item, that that checking would be reflected in the item's parents and grandparents as well. That way I can browse on a higher level and know that a given parent has at least one child with a given attribute. Doable or maybe not worth it?
 
~Thom

Comments

You could use Hierarchy equations for this...
 
  • yes/no fields: Parent=min(children): If one child is checked, the parent will be checked
  • yes/no fields: Parent=max(children): If all children are checked, the parent will be checked
For other types of fields, min, max, avg
 
With VBCode, you can even do something like this:
 
function ParentCheck(x)
  j=ubound(x)-lbound(x)+1
  tot=0
  for i=lbound(x) to ubound(x)
    y=cdbl(x(i))
    if y<>0 then tot=tot+1
  next
  if j>0 then ParentCheck=(tot/j)>0.5001
 end function
 
The parent will be checked if more than half of the subs are checked, unchecked otherwise.
 
HTH
 

ThomR

2010/06/15 16:24

In reply to by Pierre_Admin

Thanks Pierre. You had me at yes/no!

Armando

2010/06/15 16:25

In reply to by Pierre_Admin

I had the exact same request in the back of my mind... But the reverse... For downwards column equations.
 
It would (maybe) allow conditional inheritance, etc. (so instead of having stuff propagating everywhere, I could decide when something is inherited or not).
 
When I last tried it said something like "Not implemented yet"... (That's when I was looking at different ways to circumvent parent-child type of linking -- Other types of links in IQ )