Display Root Name

This dialog allows you to locate an item in the database that you are unable to find. This can happen if you have nested projects because the full name of the item does not include the path from the database root.  Run this code from the database explorer and enter either the unique ID or full-name of an item in order to find its location in the database.

DB db = null
DBE dbeName = null
DBE dbeID = null
DBE dbeRootName = null

void doApply(DB db)
 string itemID = get(dbeID)
 string itemName = get(dbeName)
 if (itemID != "")
  set(dbeName, fullName(itemFromID(itemID)))
  set(dbeRootName, rootName_(itemFromID(itemID)))
  set(dbeID, uniqueID(item(itemName)))
  set(dbeRootName, rootName_(item(get(dbeName))))

db = create(dbExplorer, "Get Root Name")

dbeID = field(db, "ID", "", 100, false)

dbeName = field(db, "Full Name", "", 100, false)

dbeRootName = field(db, "Root Name", "", 100, false)

apply(db, doApply)