Objekte cannot be found by search function

Document ID : KB000087572
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
N/A

Some objects cannot be found properly in the User interface. Via quick find, they are found, but not via the search-function from the menu. If Explorer is selected via right mouse click on the object found by the quick search, the Explorer is opened at root level. The properties shows an empty path.

Checking the objects with following SQL:

SELECT OFS.* FROM OFS WHERE OFS_OH_IDNR_O IN (SELECT OH.OH_IDNR FROM OH WHERE oh_name = 'CALL.TEST_NIX');

The result is something like that:

OFS_IDNR  OFS_OH_IDNR_F  OFS_LEVEL  OFS_OH_IDNR_O  OFS_LINK
--------- -------------- ---------- -------------- ---------
2232747   2115360        0          2190881        0

The top folder above the object is a User or a User Group:

WITH t ( object_idnr, object_name, folder_idnr, folder_name, lvl ) AS
  (
    SELECT o_oh.oh_idnr object_idnr
    , o_oh.oh_name object_name
    , f_oh.oh_idnr folder_idnr
    , CAST( SUBSTR( f_oh.oh_name, instr(f_oh.oh_name, '\'), 200 ) AS VARCHAR2(
      4000) )folder_name
    , 0 lvl
    FROM oh o_oh
    LEFT JOIN ofs o_ofs
    ON o_ofs.ofs_oh_idnr_o = o_oh.oh_idnr
    INNER JOIN oh f_oh
    ON f_oh.oh_idnr    = o_ofs.ofs_oh_idnr_f
    WHERE o_oh.oh_idnr = 2190881
    UNION ALL
    SELECT t.object_idnr
    , t.object_name
    , f_oh.oh_idnr folder_idnr
    , CAST( SUBSTR( f_oh.oh_name, instr(f_oh.oh_name, '\'), 200 ) ||
      t.folder_name AS VARCHAR2(4000) )
    , lvl + 1
    FROM oh o_oh
    INNER JOIN ofs o_ofs
    ON o_ofs.ofs_oh_idnr_o = o_oh.oh_idnr
    INNER JOIN oh f_oh
    ON f_oh.oh_idnr = o_ofs.ofs_oh_idnr_f
    INNER JOIN t
    ON t.folder_idnr = o_oh.oh_idnr
  )
SELECT folder_name AS "Folder Tree above Object"
FROM t
WHERE lvl =
  (
    SELECT MAX(lvl)
    FROM t t2
    WHERE t2.object_idnr=t.object_idnr
  );

Result:

Folder Tree above Object
-------------------------
AUT/NIX\EXAMPLE\CALL

The User in this case is AUT/NIX. Objects lying under a User (group) as Folder can only be links, as they are links in the user's favorites folder.

 

 

0EMb0000001QLZl.png

If they have OFS_LINK = 0, these objects must be corrected by deleting their OFS-entry. Execute the SQL below:

-- for Oracle
WITH fav_folders (folder_idnr) AS
  (
    -- all folders in favorites
    -- starting with User and UserGroup
    SELECT oh_idnr folder_idnr
    FROM oh
    WHERE oh_otype IN ('USER', 'USRG')
    UNION ALL
    -- recursive append Folders
    SELECT ofs_oh_idnr_o
    FROM ofs
    INNER JOIN fav_folders
    ON ofs_oh_idnr_f = folder_idnr
    INNER JOIN oh
    ON oh_idnr     = ofs_oh_idnr_o
    WHERE oh_otype = 'FOLD'
  )
-- all objects with ofs_link=0 within favorites
SELECT 0
, ooh.oh_idnr
, ooh.oh_name   AS "Name"
, ooh.oh_client AS "Client"
, ooh.oh_otype  AS "Type"
, oofs.ofs_link
, 'delete from ofs where ofs_idnr=' || CAST(oofs.ofs_idnr AS VARCHAR2(10)) ||
  ';' AS "Move to No Folder"
FROM oh ooh
INNER JOIN ofs oofs
ON ooh.oh_idnr = oofs.ofs_oh_idnr_o
WHERE 1        =1 AND oofs.ofs_link = 0 AND ooh.oh_otype <> 'FOLD' AND EXISTS
  (
    SELECT 0
    FROM fav_folders
    WHERE fav_folders.folder_idnr = oofs.ofs_oh_idnr_f
  );

Result:

0  OH_IDNR  Name           Client  Type  OFS_LINK  Move to No Folder
-- -------- -------------- ------- ----- --------- ----------------------------------------
0  2190881  CALL.TEST_NIX  1977    CALL  0         delete from ofs where ofs_idnr=2232747;

The SQL shows the affected objects and gives for each one a delete-statement to correct this. Execute the delete. The wrong folder association is deleted and the object appears in <No Folder> where it can be accessed normally.
 

Cause:
Cause type:
Other
Root Cause: It can happen, if you move folders to your favorites folder and delete the folder before deleting the objects in the folder.
Resolution:
This field was added on 30/03/2017. This article has not been updated yet. Refer to the "Description" or "Workaround" sections for solution information.

Fix Version(s):
n/a
Additional Information:
Workaround :
Move the object from the result list of the quick search to some folder. There the object is again normally accessible.