The designator grandparent describes the parent note of the current note's parent, i.e its grandparent.
It is especially useful for representing the relationship of an exploded note to its source note as the former don't automatically inherit the latter's attributes.
Designators don't allow offset references as with attributes. Thus $Name("Some note") works but child("Some note") doesn't. If an offset designator is needed use find() instead.