Nested relationship queries can get very hairy due to the weird rules for delimiter substitution. And more so because they canāt contain newline characters.
If we describe your requirement as:
Get all descendant users of group x
Get all favorites folders for identified users
Get all descendant objects of identified favorites folder
Also include the favorites folders themselves.
we see that itās a third-order relationship. The following query will do it for the Administrators group:
select si_name,si_kind from ci_infoobjects
where
descendants
(
"si_name='folder hierarchy'",
"children('si_name=''user-favorites'' ',
'children(''si_name=''''usergroup-user'''' '',
''si_name=''''administrators'''' '')')"
)
or
children("si_name='user-favorites'",
"descendants('si_name=''usergroup-user'' ','si_name=''administrators'' ')")
Note that Iāve formatted this for easy reading. Youāll need to remove all the newlines between the double quotes in order for it to work.