View Single Post
  #1  
Old 11-20-2012, 10:13 PM
seanferns seanferns is online now
Registered User
 
Join Date: 01-30-2012
Posts: 56
Get parents of currently selected item

I am trying to use the nested search to get all immediate parents of the currently selected item.
The hierarchy is:
test1
parent1
parent2
test2
parent1
parent2
parent1
child1
child2
parent2
child3
child4
The first saved search is "limit search to selected...." with "parent count" greater than 1.
The next search is Item is "parent of" the search above without the "limit search to selected...." selected. Now click on Parent1 and this search. This returns all items which have linked items.

Is there a way I can get the search to return only test1 and test2 ?

Sample of the above is attached.

As an aside from this, 2 enhancements which would be very useful are
a) getting the current item id and
b) allowing direct SQL queries which return one or more itemIds
Attached Files
File Type: zip get-parent.zip (80.2 KB, 1165 views)

Last edited by seanferns; 11-21-2012 at 01:34 AM.
Reply With Quote