This type of query can be performed using either SQL queries directly to the Worksite backend, or using the Worksite API
In my opinion, the use of the API is preferable, since the layout of the database can change using different versions of Worksite.
Assuming you have a connection to the workstation and the session is logged in using this function, you can search for documents (including the type of search you want):
private IManDMS mainDMS; private IManDatabase currentDatabase; public IManDocument[] SearchDocuments(Dictionary<imProfileAttributeID, string> dictProfleSearchParameters) { List<IManDocument> foundDocuments = new List<IManDocument>(); IManProfileSearchParameters searchParams = mainDMS.CreateProfileSearchParameters(); foreach (KeyValuePair<imProfileAttributeID, string> kvp in dictProfleSearchParameters) ((IManProfileSearchParameters)searchParams).Add((IManage.imProfileAttributeID)kvp.Key, kvp.Value); IManContents foundDocs = currentDatabase.SearchDocuments(searchParams, true); foreach (IManDocument document in foundDocs) foundDocuments.Add(document); return foundDocuments.ToArray(); }
source share