AnsweredAssumed Answered

SQL query to list all objects (and folders) under a given folder

Question asked by Michael_Lowry on Nov 23, 2015
Latest reply on Oct 26, 2017 by Michael_Lowry
We discovered last week that there is no straightforward way to restrict the number of results normal users can retrieve from searches without also impacting searches performed by administrators and those performed by our own internal processes, The Automation Engine applies the same limit to all searches:
  • Searches performed in the Java user interface
  • Searches performed in the ECC
  • Searches performed by normal users
  • Searches performed by administrative users
  • Searches performed by an external program, using the SearchObjectclass of the Java Application Interface. 

Regardless of who performs the search or how, the search is subject to the limit specified in GENERIC_SEARCH_LIMIT in UC_SYSTEM_SETTINGS in client 0.

Because the Automation Engine provides no mechanism for finer-grained control, we are trying to find an alternative approach. My first idea was that we could perform our own internal searches using direct SQL queries of the Automation Engine database. I thought before I invested the effort in developing these queries , I should check here first to see if anyone had already done something similar. We need two queries:
  1. List allobjectsunder a specified folder, including under all sub-folders.
  2. List allfoldersunder a specified folder, including under all sub-folders.

Has anyone else done this before? Thanks in advance for any help.