Query Tree Item Roots (Tip)


Returns all the property values of the roots of items in the specified view, in a chosen project
this query returns root items in any folder in a view
root tree items are items which have no parent items. (they may or may not have child tree items) 
The view's root folder is a special case of a folder tree root. 
It is the only folder which has no parent. If the query is run for the folder type, it returns an array of 1, the root folder
All branchable items are roots. They have no children and no parents.
For branchable items, change packages, and traces, this query returns all the viewmembers in the view fully populated

In general, this query is most useful to identify root tree items, i.e. tree items which have no parent tree items,
but it is guaranteed not to fail for other types

  projectid the integer id of the chosen project
  viewid the integer id of a view of the project
  typeid the integer id of a viewmember type from the server catalog
  sessionid a valid session for the logged on user running this query
  folderid an optional integer folder id to constrain the results to root items in the specified folder
 @return the property values of the roos

usage example


How To-Best Practice
Comment List