DM API Reference Guide Hummingbird Enterprise™ 2004
DM API Reference Guide Version: 5.1.0.5 Copyright © 1998-2004 Hummingbird Ltd. All rights reserved. Electronic Publication Date: April 2004 Hummingbird Enterprise™ 2004, DM, and RM are trademarks of Hummingbird Ltd. and/or its subsidiaries. All other copyrights, trademarks, and trade names are the property of their respective owners. Your enclosed license agreement with Hummingbird Ltd. or one of its affiliates specifies the permitted and prohibited uses of the product.
Contents Preface About This Guide xv Who Should Read This Guide How This Guide Is Organized Documentation Conventions Related Documentation xvi Professional Services xvii Where to Go for Information On the Web xviii xv xv xvi xviii On the DM Suite CD xviii Technical Support and Training xix North America Technical Support xix Asia/Pacific Technical Support xix Europe Technical Support xix Training xx Chapter 1 The DM Architecture The DM Multi-Tier Architecture 2 DM Functionality 2 Document Security To
Child Objects of PCDDocObject Objects 7 The Logon Process 7 Getting a List of Available Libraries 8 Providing Library Access 9 DM Search Transactions 11 General Steps to Performing a Search 12 Retrieving Recently Edited Documents 13 Performing a Simple Search 16 Document Objects 19 Fetching a DM Document Object 19 Getting and Updating Trustee Information 23 Chapter 2 An Overview of the DM API The PCDClient Object 30 List of DM API Objects 30 Early and Late Binding 31 Early Binding 31 Late Binding 31 Metho
PCDNetworkInfo 69 PCDPropertyList 83 PCDPropertyLists 96 PCDPutDoc 97 PCDPutStream 102 PCDRecentDoc 103 PCDSearch 105 PCDSQL 107 PCDTrusteeList 125 Chapter 4 DM API Methods and Properties AddLogin 128 AddLoginLicensed 132 AddOrderByProperty 135 AddProperty 137 AddReturnMetaProperty 138 AddReturnProperty 140 AddSearchCriteria 142 AddSearchLib 145 AddTrustee 147 AddUserFilterCriteria 149 BeginGetBlock 150 BeginIter 151 BytesRead 153 BytesWritten 154 ClearOrderByProperties 155 ClearUserFilterCriteria 156 Clo
DeleteTrustee 163 EndGetBlock 164 ErrDescription 165 ErrNumber 166 Execute 167 Fetch 169 FetchTrustees 170 GetAliasList 174 GetAt 175 GetColumnCount 176 GetColumnName 177 GetColumnValue 178 GetCurrentPropertyName 179 GetCurrentPropertyValue 180 GetCurrentTrusteeFlags 181 GetCurrentTrusteeName 182 GetCurrentTrusteeRights 183 GetDBVendor 184 GetDomainList 185 GetDOCSUserName 187 GetDST 188 GetFailedLoginList 189 GetGroupList 191 GetGroupMembers 193 GetLoginLibrary 195 GetMetaPropertyValue 196 GetMetaRowsFound
GetPropertyIndex 206 GetPropertyValue 209 GetPropertyValueByIndex 211 GetReturnProperties 213 GetReturnProperty 215 GetRowCount 216 GetRowsAffected 217 GetRowsFound 218 GetSearchCriteria 220 GetSize 221 GetSQLErrorCode 223 GetTrustee 225 GetTrusteeIndex 227 GetTrusteeRights 229 GetTrustees 230 GetUserFullName 231 GetUserGroups 233 GetUserList 235 GetValue 237 GrantRight 238 HasRight 240 IsEmpty 242 IsMemberOf 243 NewEnum 245 Next 246 NextMetaRow 247 NextProperty 248 NextRow 249 NextTrustee 251 OnEndPage 252
Read 254 ReleaseResults 255 Reset 256 RevokeRight 257 Seek 259 SetChunkFactor 260 SetComplete 262 SetDST 263 SetLibrary 265 SetLookupId 266 SetMaxRows 268 SetMetaRow 270 SetObjectType 272 SetOptions 274 SetProperties 276 SetProperty 277 SetReturnProperties 279 SetRow 280 SetSearchCriteria 282 SetSearchObject 284 SetTargetProperty 286 SetTrustee 288 SetTrustees 290 SetTrusteeRights 292 Skip 293 UnitName 294 UnitType 295 Update 297 UpdateTrustees 298 UserName 299 Write 300 viii
Chapter 5 DM API Tokens %ADD_ATTACHMENT 302 %ATTACHMENT_ID 303 %CHECKIN_DATE 304 %CHECKOUT_COMMENT 305 %CONTENT 306 %CONTENTS_AFTER_ITEM 308 %CONTENTS_COPY_CONTENTS 310 %CONTENTS_DIRECTIVE 312 %CONTENTS_ITEM 314 %CONTENTS_MOVE_AFTER 316 %CONTENTS_MOVE_DOWN 318 %CONTENTS_MOVE_TO_TOP 320 %CONTENTS_MOVE_UP 322 %CONTENTS_REORDER_CONTENTS 324 %CONTENTS_SRC_PARENT 326 %CONTENTS_SRC_PARENT_LIBRARY 327 %CONTENTS_SRC_PARENT_VERSION 328 %CONTENTS_DST_PARENT 329 %CONTENTS_DST_PARENT_LIBRARY 330 %CONTENTS_DST_PARENT_
%DELETE_PHYSICAL_FILES 345 %DOCS_LIBRARY_NAME 346 %DOCUMENT_NUMBER 348 %EFFECTIVE_RIGHTS 350 %ELAPSED_TIME 352 %ENCAPSULATION_TYPE 354 %FILTER_DISABLED_ROWS 356 %FOLDERITEM_LIBRARY_NAME 357 %FORM_APPLICATION 359 %FORM_DEFAULT_PRIMARY 361 %FORM_LIST_TYPE 363 %FORM_NAME 365 %FORM_PROFILE_DEFAULTS 367 %FORM_TITLE 369 %FT_CHARACTER_SET 371 %FT_CONFIDENCE 373 %FT_FORMAT 375 %FT_MARKER_LIST 377 %FT_SCORE 379 %FT_SMART_DOCUMENT 381 %FT_TIMESTAMP 383 %FT_VCC_LIST 385 %FT_VCC_RULES 387 %GET_ALL_RELATED 389 %GET_LOCA
%LOCK_FOR_CHECKOUT 403 %LOOKUP_ID 404 %MAKE_READ_ONLY 406 %MAXDAYS 408 %NUM_COMPONENTS 409 %OBJECT_IDENTIFIER 410 %OBJECT_TYPE_ID 412 %ORDER_BY 413 %PCD_DELETEVERSION 414 %PCD_NEW_VERSION 415 %PCD_NEWSUBVERSION 416 %PCD_PARM_HTML_RENDERING 417 %PCD_PARM_LIB_SETTINGS 419 %PCD_UPDATE_VERSION 420 %PR_ACCESS_CONTROL 421 %PR_CONTENT_COPY 423 %PR_CONTENT_DELETE 425 %PR_CONTENT_EDIT 427 %PR_CONTENT_RETRIEVE 429 %PR_CONTENT_VIEW 431 %PR_EDIT 433 %PR_VIEW 435 %PRIMARY_KEY 437 %PROFILE 438 %PROPERTYNAME 440 %PROPERTY
%RECENTACTIVITYTIME 454 %RELATED_REMOTE_LIBS 455 %REMOVE_READ_ONLY 456 %RENDITION_TYPE 459 %RIGHT8 461 %RIGHT9 463 %SCORE_GRAPHIC 465 %SCORE_PERCENT 467 %SEARCH 469 %SECURITY 471 %STATUS 472 %TARGET_LIBRARY 474 %TITLE 475 %TRUSTEE_ID 477 %TRUSTEE_RIGHTS 479 %TRUSTEE_TYPE 481 %TRUSTEES_ADD 483 %TRUSTEES_REMOVE 485 %TRUSTEES_SET 487 %TRUSTEES_UPDATE 489 %UNLOCK 491 %UNPUBLISH_VERSION 492 %USER_ID 494 %VERIFY_ONLY 495 %VERSION_AUTHOR 497 %VERSION_COMMENT 498 %VERSION_DIRECTIVE 500 %VERSION_ID 502 %VERSION_LABE
%VISIBLE 507 xiii
xiv
Preface About This Guide This guide describes the application programming interface (API) that is available as part of DM. It identifies each of the objects comprising the API and discusses the methods and properties that each object supports. Who Should Read This Guide Users who extend DM functionality by creating their own custom enhancements will use the DM API Reference Guide to show them how their extensions can operate seamlessly with the base product.
Documentation Conventions This book uses the following fonts and styles to indicate different types of information. Convention Meaning Italic Indicates a new term or variable in a command line. For example, replace filename with the name of a file. Monospaced font Indicates a file, directory, drive or command name, program code, or other text that appears on the computer screen. For example, the default library for DM is usually c:\Program Files\ Hummingbird\DM Server.
Professional Services Hummingbird’s Professional Services’ consultants and educators successfully design, create, and implement powerful integrated solutions based on Hummingbird technology. They are dedicated to forging sustainable, long-term relationships with our clients and partners by delivering superior consulting, training, and education solutions.
Where to Go for Information On the Web On the DM Suite CD Our Web site at www.hummingbird.com/support/dkm/ carries the most up-to-date information about Hummingbird’s document and knowledge management products. This information is presented in individual technical bulletins and in Knowledge Base Solutions, each dealing with a specific topic that is not covered in our manuals or that updates information in the manuals.
4 Follow the on-screen instructions and install the program. When complete, exit the DM Product Line Installation menu. To access the entire DM documentation set: 1 Insert the DM Suite CD into your computer’s CD-ROM drive. 2 The DM Product Line Installation menu will be displayed. Click Documentation. 3 Select Browse Documentation. Double-click the Online Manuals directory. 4 Double-click HummingbirdDMBooks.html. Your Internet browser will launch and a menu listing the DM documentation set will appear.
Training Hummingbird’s Education Services offers courses at authorized training centers worldwide. For more information or to register for classes, contact Hummingbird Education Services: Telephone: E-Mail: Internet Address: xx CHAPTER 3 613 238 1761 education@hummingbird.com www.hummingbird.
C h a p t e r 1 The DM Architecture In This Chapter This chapter provides an overview of the DM functionality, illustrating how the major components of DM are designed to work with one another. Code samples illustrate how custom applications can perform many basic operations, such as allowing user access and performing searches.
The DM Multi-Tier Architecture The DM Multi-Tier Architecture DM is an application that runs on Windows NT/2000/XT Pro systems. As shown in the illustration below, the DM API provides a basic set of operations that interface with the DM Server. Client applications— whether the DM Webtop, any of the DM Extensions, or custom software you might develop—extend the DM API by providing a user interface and any other functionality appropriate to the new application.
DM Functionality The DM Server is a transaction server, similar to Microsoft SQL Server. The DM Server manages database connections via a connection pool. A client application connects to the DM Server via DCOM (Distributed Component Object Model) interfaces that are typically free threaded. The DM executable file (DOCSFusion.EXE) loads COM objects configured in the registry. Once connected, users can connect to any repositories to which they have access rights.
Document Security Tokens A document security token (DST) is initially constructed by DM when a user logs on via a client application to the server and is required for DM transactions. The DST can be used across multiple DM Servers—when the user logs on to other DM Servers to access other Document libraries, the server information is appended to the DST—or the client application can use multiple DSTs.
Types of DM Objects The DM Object Model consists of Distributed Component Object Model (DCOM) objects that are exposed via DM. Operations on DM objects map to operations on tables and typically require several properties to be set to define the objects. The object properties after instantiation may differ depending on how the object was created. When building a DM client application, you will use the PCDClient type library (pcdclient.
Types of DM Objects Defining a DM Object • Query (read only), which is used for search, Quick Retrieve, and lookups. • PCDDocObject (read/write), which implements the DM objects and modifies tables in the library database. • Child objects of PCDDocObject (read/write), which get or set trustees, and perform file uploads and downloads.
The Logon Process DM Query Objects Document Objects • PCDError • PCDGetLoginLibs • PCDLogin • PCDNetAliasList Query objects are used to search the library database. The query is constructed in memory, executed, and the results returned to the client application. The following are DM query objects: • PCDLookup • PCDRecentDoc • PCDSearch Document objects are document management system (DMS) objects that represent database entities that can be modified.
The Logon Process Getting a List of Available Libraries The following example displays a list of libraries managed by the DM Server that the user can log on to. . . . Private Declare Function GetUserName Lib _ "advapi32.
The Logon Process If (opOK) Then libname = Libs.GetAt(i) opOK = opOK And Libs.ErrNumber = 0 If i = 0 Then LibCombo.Text = libname LibCombo.AddItem libname End If Next 'List of Network logon types. NetworkType.AddItem "Network Bindery" NetworkType.AddItem "Network NDS" NetworkType.AddItem "Microsoft Network" NetworkType.Text = "" End Sub Private Sub cmdCancel_Click() OK = False Me.Hide End Sub Providing Library Access The next subroutine creates the PCDLogin object.
The Logon Process Dim lim As Long Dim LoginType As Integer Dim emsg As String If (NetworkType = "Network Bindery") Then LoginType = 1 ElseIf (NetworkType = "Network NDS") Then LoginType = 2 ElseIf (NetworkType = "Microsoft Network") Then LoginType = 8 Else LoginType = 0 End If If (Domain.Text <> "" And LoginType <> 0) Then 'The Network and Domain are specified, so 'log on to the network. login.AddLogin LoginType, Domain.Text, _ txtUserName.Text, txtPassword.Text Else 'Just log on as a Library user. login.
DM Search Transactions txtPassword.SelStart = 0 txtPassword.SelLength = Len(txtPassword.Text) End If 'Dump any available information for 'debugging purposes. Set fl = _ CreateObject("PCDClient.PCDNetAliasList") Set fl = login.GetFailedLoginList lim = fl.GetSize() - 1 For i = 0 To lim Debug.Print "FAILED List: "; _ fl.UnitName(i) & ";" & fl.UnitType(i) _ & ";" & fl.UserName(i) Next Set fl = Nothing Set fl = login.GetAliasList lim = fl.GetSize() - 1 For i = 0 To lim Debug.Print "Alias List: "; _ fl.
DM Search Transactions 3 The DM Server does the following: — Captures search criteria, and immediately returns a “no results” message to the client. — Performs the search on requested databases and full-text repositories. — Collects the results set and sorts it as user specified. — Caches the results of the search and returns them to the client when requested. The cached results can be deleted by the client using the ReleaseResults method. Also, results may time out based on administration settings.
DM Search Transactions operation. The default is 10. You do not need to repeat the execution of the search to get the next chunk. DM automatically does that for you. 10 Execute the search. For the search results returned, you can: Retrieving Recently Edited Documents • Obtain the number of rows found. • Get all the returned properties. • Iterate through the rows. • Get values for properties returned by the search. • Release the results set to free server memory.
DM Search Transactions rec.AddReturnProperty rec.AddReturnProperty rec.AddReturnProperty rec.AddReturnProperty "LASTEDITDATE" "DOCNAME" "TYPIST_ID" "STATUS" rec.AddOrderByProperty "LAST_EDIT_DATE", 0 rec.Execute If (rec.ErrNumber <> 0) Then MsgBox "RecentEdit Failure on Execute: " & _ rec.ErrNumber & " " & _ rec.ErrDescription, , "Recent Edit" Else lim = rec.
DM Search Transactions row = row & _ rec.GetPropertyValue("TYPIST_ID") _ & Chr(9) row = row & _ rec.GetPropertyValue("STATUS") reGrid.AddItem row End If i = i + 1 Wend rec.ReleaseResults End If Screen.MousePointer = vbDefault End Sub Private Sub Form_Resize() Dim i As Long Dim cw As Long reGrid.Width = Width - 100 cw = reGrid.Width / reGrid.Cols For i = 0 To reGrid.Cols - 1 reGrid.ColWidth(i) = cw Next End Sub Private Sub reGrid_Click() If reGrid.
DM Search Transactions 'Versions (dn) End If End Sub Performing a Simple Search The following example demonstrates how to do a simple search. . . . Private Sub cmdCancel_Click() Me.Hide End Sub Private Sub cmdDoLookup_Click() cboDocType.Clear Call LookupDocType(cboDocType) End Sub Private Sub cmdSearch_Click() Dim rec As New PCDSearch Dim i As Long Dim count As Long Dim row As String Screen.MousePointer = vbHourglass rec.SetDST DST rec.AddSearchLib library 'This example uses the CYD_DEFPROF form. rec.
DM Search Transactions rec.AddReturnProperty "SYSTEM_ID" rec.AddReturnProperty "TYPE_ID" rec.AddReturnProperty "LASTEDITDATE" rec.AddReturnProperty "DOCNAME" rec.AddReturnProperty "AUTHOR_ID" rec.AddReturnProperty "STATUS" 'NOTE: This search should return data sorted 'by last edit then by document number. rec.AddOrderByProperty "LAST_EDIT_DATE", 0 rec.AddOrderByProperty "DOCNUM", 1 rec.Execute If (rec.ErrNumber <> 0) Then MsgBox "Search Failure on Execute: " & _ rec.ErrNumber & " " & rec.
DM Search Transactions rec.GetPropertyValue("SYSTEM_ID") _ & Chr(9) row = row & _ rec.GetPropertyValue("APP_ID") _ & Chr(9) row = row & _ rec.GetPropertyValue("TYPE_ID") _ & Chr(9) row = row & _ rec.GetPropertyValue("LASTEDITDATE") _ & Chr(9) row = row & _ rec.GetPropertyValue("AUTHOR_ID") _ & Chr(9) row = row & _ rec.GetPropertyValue("STATUS") reGrid.AddItem row End If i = i + 1 Wend rec.ReleaseResults End If Screen.MousePointer = vbDefault End Sub Private Sub cmdShowLookup_Click() frmLookup.
Document Objects reGrid.row = reGrid.RowSel reGrid.Col = 1 txtSelDocNumber = reGrid.Text docnumber = reGrid.Text End Sub Document Objects The steps for working with the PCDDocObject object and other DM API objects are as follows: 1 Set the DST. 2 Set the object type property to the name of the form. 3 Set the library as a property of the object. 4 Set the object properties, each of which requires a name/value pair. 5 Once all the relevant properties have been set, create the object.
Document Objects Dim doc As New PCDDocObject If docnumber = "" Or versionid = "" Then MsgBox "Check In requires that you set " _ & "the document number and " _ & "the version ID." Exit Sub End If doc.SetDST DST doc.SetObjectType "cyd_defprof" doc.SetProperty "%TARGET_LIBRARY", library doc.SetProperty "%OBJECT_IDENTIFIER", docnumber doc.SetProperty "%VERSION_ID", versionid doc.SetProperty "%STATUS", "%UNLOCK" doc.Update 'Check for error. Dim lngENum As Long lngENum = doc.
Document Objects txtStatus = doc.GetReturnProperty("STATUS") Set doc = Nothing If txtStatus = 0 Then cmdCheckOut.Enabled = True cmdCheckIn.Enabled = False Else cmdCheckOut.Enabled = False cmdCheckIn.Enabled = True End If MsgBox "Status field in profile updated " _ & "to 0 (checked in)." End Sub . . .
Document Objects If (rec.ErrNumber <> 0) Then MsgBox "Fetch Doc Failure on Execute: " & _ rec.ErrNumber & " " & rec.ErrDescription, _ , "Fetch Doc" Else lim = rec.GetRowsFound i = 1 While i <= lim rec.NextRow If (rec.ErrNumber <> 0) Then i = lim + 1 MsgBox "Fetch Doc Failure on Execute: " _ & rec.ErrNumber & " " & _ rec.ErrDescription, , "Fetch Doc" End If If (i = 1) Then Set gd = rec.
Document Objects End If FetchFlag = True MsgBox "Exported document content to " _ & "designated file: " & FileName End Sub . . . Getting and Updating Trustee Information The following example updates the trustees for a profiled document object. . . .
Document Objects Set pclient = _ CreateObject("PCDClient.PCDSearch") pclient.SetDST DST pclient.AddSearchLib library 'This example uses the "def_qbe" form. pclient.SetSearchObject "def_qbe" 'Set the properties to be returned. These 'are the properties to be displayed in the 'search results page. pclient.AddReturnProperty("DOCNAME") pclient.AddReturnProperty("DOCNUM") pclient.AddReturnProperty("AUTHOR_ID") pclient.AddReturnProperty("STATUS") pclient.AddReturnProperty("VERSION") pclient.
Document Objects txtDefaultRights = Str(DefaultRights) pclient.ReleaseResults Set PDoc = _ CreateObject("PCDClient.PCDDocObject") PDoc.SetDST DST PDoc.SetProperty "%TARGET_LIBRARY", library PDoc.SetObjectType("DEF_PROF") PDoc.SetProperty "%OBJECT_IDENTIFIER", _ docnumber PDoc.Fetch 'Check for error. Dim lngENum As Long lngENum = PDoc.ErrNumber If lngENum <> 0 Then Dim strEDesc As String, strENum As String strEDesc = PDoc.
Document Objects GetTrusteesforProfile = True Exit Function End If ErrorHandler: MsgBox "Unhandled Error: " & _ Str(Err.Number) & " was generated by " _ & Err.Source & Chr(13) & Err.Description End Function . . . Private Sub cmdAddTrustee_Click() 'Two ways to do this: '1) Set trustee on profile object and ' update trustees. Set PDoc = _ CreateObject("PCDClient.PCDDocObject") PDoc.SetDST DST PDoc.SetProperty "%TARGET_LIBRARY", library PDoc.SetObjectType("DEF_PROF") PDoc.
Document Objects lngENum = PDoc.ErrNumber If lngENum <> 0 Then Dim strEDesc As String, strENum As String strEDesc = PDoc.ErrDescription strENum = CStr( lngENum ) MsgBox "Error " & strENum & ": " & strEDesc 'Handle the error... End If PDoc.Update 'Check for error. Dim lngENum As Long lngENum = PDoc.ErrNumber If lngENum <> 0 Then Dim strEDesc As String, strENum As String strEDesc = PDoc.ErrDescription strENum = CStr( lngENum ) MsgBox "Error " & strENum & ": " & strEDesc 'Handle the error...
Document Objects PDoc.Update 'Check for error. Dim lngENum As Long lngENum = PDoc.ErrNumber If lngENum <> 0 Then Dim strEDesc As String, strENum As String strEDesc = PDoc.ErrDescription strENum = CStr( lngENum ) MsgBox "Error " & strENum & ": " & strEDesc 'Handle the error... End If End Sub . . .
C h a p t e r 2 An Overview of the DM API In This Chapter This chapter describes the overall structure of the DM API, including an itemized list that shows the methods and properties that each object supports. It also presents information that applies across the entire API.
The PCDClient Object The PCDClient Object Your custom applications interact with the DM Server through a number of objects that are collectively referred to as the PCDClient. To use the PCDClient objects, you should have some understanding of the Distributed Component Object Model (DCOM). List of DM API Objects The following is a list of the DM client objects that comprise the DM API.
Early and Late Binding PCDSQL PCDTrusteeList Early and Late Binding You can create objects in the DM API using either early binding or late binding. Examples shown in this document will sometimes use early binding, and other times will use late binding. In custom applications you implement, you can usually use either, but there are a few instances where the text will indicate that one should be used in preference to the other.
Methods and Properties Supported by DM API Objects Each of the DM API objects supports two or more methods or properties that perform the various tasks related to that object. The methods and properties that each DM API object supports are listed below. Many PCDClient objects support methods and properties with the same name. For example, all PCDClient objects access the ErrNumber and ErrDescription properties.
Methods and Properties Supported by DM API Objects HasRight RevokeRight SetDST SetObjectType SetProperties SetProperty SetTrustee SetTrustees Update UpdateTrustees PCDEnumPropertyLists Clone Next Reset Skip PCDError ErrDescription ErrNumber PCDGetDoc AddSearchCriteria Execute GetPropertyValue GetReturnProperties GetRowsFound GetSearchCriteria NextRow SetDST SetRow AN OVERVIEW OF THE DM API 33
Methods and Properties Supported by DM API Objects SetSearchCriteria SetSearchObject PCDGetForm AddSearchLib Execute GetPropertyValue SetDST SetObjectType PCDGetLoginLibs Execute GetAt GetSize PCDGetStream BytesRead GetPropertyValue Read Seek SetComplete PCDLogin AddLogin Execute GetAliasList GetDOCSUserName GetDST GetFailedLoginList GetLoginLibrary GetPrimaryGroup SetDST 34 CHAPTER 2
Methods and Properties Supported by DM API Objects PCDLookup AddOrderByProperty AddSearchCriteria AddSearchLib AddUserFilterCriteria ClearOrderByProperties ClearUserFilterCriteria ColumnCount Execute GetMetaPropertyValue GetMetaRowsFound GetPropertyValueByIndex GetRowsFound GetSearchCriteria NextMetaRow NextRow ReleaseResults SetChunkFactor SetDST SetLookupId SetMaxRows SetMetaRow SetRow SetSearchCriteria SetSearchObject SetTargetProperty PCDNetAliasList GetSize UnitName AN OVERVIEW OF THE DM API 35
Methods and Properties Supported by DM API Objects UnitType UserName PCDNetworkInfo GetDomainList GetGroupList GetGroupMembers GetRowCount GetUserFullName GetUserGroups GetUserList GetValue IsMemberOf NextRow SetDST PCDPropertyList AddProperty BeginIter DeleteProperty GetCurrentPropertyName GetCurrentPropertyValue GetPropertyIndex GetPropertyValue GetSize NextProperty PCDPropertyLists BeginIter Execute GetCurrentPropertyName 36 CHAPTER 2
Methods and Properties Supported by DM API Objects GetCurrentPropertyValue NewEnum NextProperty NextRow SetChunkFactor SetDST SetObjectType SetOptions SetProperties SetProperty PCDPutDoc AddSearchCriteria Execute GetPropertyValue GetReturnProperties GetRowsFound GetSearchCriteria NextRow SetDST SetRow SetSearchCriteria SetSearchObject PCDPutStream BytesWritten GetPropertyValue SetComplete Write AN OVERVIEW OF THE DM API 37
Methods and Properties Supported by DM API Objects PCDRecentDoc AddOrderByProperty AddReturnMetaProperty AddReturnProperty AddSearchCriteria AddSearchLib BeginGetBlock ColumnCount EndGetBlock Execute GetMetaPropertyValue GetMetaRowsFound GetPropertyValue GetPropertyValueByIndex GetReturnProperties GetRowsFound GetSearchCriteria NextMetaRow NextRow ReleaseResults SetChunkFactor SetDST SetMaxRows SetMetaRow SetReturnProperties SetRow SetSearchCriteria SetSearchObject 38 CHAPTER 2
Methods and Properties Supported by DM API Objects PCDSearch AddOrderByProperty AddReturnMetaProperty AddReturnProperty AddSearchCriteria AddSearchLib BeginGetBlock ColumnCount EndGetBlock Execute GetMetaPropertyValue GetMetaRowsFound GetPropertyValue GetPropertyValueByIndex GetRowsFound NextMetaRow NextRow ReleaseResults SetChunkFactor SetDST SetMaxRows SetMetaRow SetReturnProperties SetRow SetSearchCriteria SetSearchObject PCDSQL Execute GetColumnCount AN OVERVIEW OF THE DM API 39
Methods and Properties Supported by DM API Objects GetColumnName GetColumnValue GetDBVendor GetNextKey GetRowCount GetRowsAffected GetSQLErrorCode NextRow ReleaseResults SetDST SetLibrary SetRow PCDTrusteeList AddTrustee BeginIter DeleteTrustee GetCurrentTrusteeFlags GetCurrentTrusteeName GetCurrentTrusteeRights GetSize GetTrusteeIndex GetTrusteeRights NextTrustee SetTrusteeRights 40 CHAPTER 2
Tokens Supported by DM API Methods and Properties Tokens Supported by DM API Methods and Properties Tokens are special identifiers that instruct the DM Server to perform specific actions. They are often used as a short-hand reference to an object that otherwise could only be described by a longer text string, such as a reference to a SQL table and column. For example, the %LOGIN_DATE token can substitute for as a reference for the PEOPLE.LAST_LOGIN_DATE column of the SQL database.
Tokens Supported by DM API Methods and Properties 42 CHAPTER 2
C h a p t e r 3 DM API Objects In This Chapter This chapter describes each of the DM objects, including their syntax, usage, and other related information.
PCDASPFileUpload PCDASPFileUpload Use this object only from scripts running inside Active Server Pages (ASP). This object is used to read from the ASP Request object and write to the supplied PCDPutStream object. Syntax PCDASPFileUpload.methodOrProperty Usage The PCDASPFileUpload object is a client-side interface (CSI) object used to extract form data (specifically, uploaded files) from the requested object when a form is submitted. When uploading a file, ENCTYPE is set to “multipart/form-data.
PCDASPFileUpload PCDASPFileUpload is a helper class/interface/object that supports the tying of the POST of an ASP Multipart/Form file into a PCDPutStream. (The GET method is not supported in PCDPutStream, so always use POST.) It handles all the parsing of headers from the body content and streaming of the file that is to be uploaded into the DM PCDPutStream object.
PCDASPFileUpload . . .
PCDDocObject PCDDocObject This object is one of the true workhorses of the DM API. Custom applications use it to manipulate Document objects. Document objects include such elements as Document Profiles, search forms, and versions. Syntax PCDDocObject.methodOrProperty Example The following is an example of creating an instance of the PCDDocObject. . . . pObject = _ Server.CreateObject("PCDClient.PCDDocObject") . . .
PCDDocObject SetDST SetObjectType SetProperties SetProperty SetTrustee SetTrustees Update UpdateTrustees See the following properties: ErrDescription ErrNumber 48 CHAPTER 3
PCDEnumPropertyLists PCDEnumPropertyLists This object allows you to iterate through collections of property lists. Most often used with documents and folders, PCDEnumPropertyLists also allows you to iterate through the property lists associated with collections of versions, root objects, and other items. For example, if a folder is deleted, all of the documents and folders it contained must have their properties updated to indicate that they are no longer contained in the deleted folder.
PCDError PCDError This object is a base object for all other PCDClient objects. It provides common properties that you access through the other objects to get error information. Usage You do not have to create an instance of this object. All other PCDClient methods access it directly. Example All PCDClient objects can access the PCDError objects properties without creating a PCDError object in their application.
PCDGetDoc PCDGetDoc This object is used to manage the retrieval of a set of physical files that comprise the components of one version of a document. You use this object just as you would the PCDSearch object. Use PCDGetDoc.AddSearchCriteria to specify the criteria that identify which document and version you want. Normally, this would mean specifying criteria like "%DOCUMENT_NUMBER" "79", "%VERSION_ID" "3". The provided criteria must resolve to exactly one version of one document. Syntax PCDGetDoc.
PCDGetDoc 7 After file retrieval is complete, release memory associated with your PCDGetDoc object.
PCDGetDoc Example The following example shows you can use PCDGetDoc to retrieve the name of a file that contains a document in your DM repository. . . . Dim objGetDoc As New PCDGetDoc objGetDoc.SetDST strDST objGetDoc.AddSearchCriteria _ "%TARGET_LIBRARY", strLib objGetDoc.AddSearchCriteria _ "%DOCUMENT_NUMBER", strDocNum objGetDoc.AddSearchCriteria _ "%VERSION_ID", strVersionID objGetDoc.Execute If objGetDoc.ErrNumber <> 0 Then 'Error occurred.
PCDGetDoc . .
PCDGetForm PCDGetForm Use this object to retrieve information contained in the FORMS table in the SQL database. It is presently used specifically for the JavaForms interface. Syntax PCDGetForm.methodOrProperty Example The following example shows how to create an instance of this object. . . . pLibs = Server.CreateObject("PCDClient.PCDGetForm") . . .
PCDGetLoginLibs PCDGetLoginLibs Use this object to get a list of available logon libraries from the DM Server. This is a list of the libraries configured in DM Server Manager, and they are obtained from a PCDOCS.INI file in the system. Syntax PCDGetLoginLibs.methodOrProperty Usage This object allows you to determine which libraries are available for use by a user. Users can log on to any libraries this object returns. You also use it to select the current working library.
PCDGetLoginLibs ReDim strLibName(LNumOfLibs) For LCounter = 0 To LNumOfLibs strLibName(LCounter) = _ objGetLibs.GetAt(LCounter) lstLibList.AddItem strLibName Next Set objGetLibs = Nothing . . .
PCDGetStream PCDGetStream Use this object to provide the user with a way to read the contents of a physical file. Syntax PCDGetStream.methodOrProperty Usage When calling this object, after each Read, you should check the ErrNumber property. If ErrNumber returns zero (indicating that no error occurred), you should check the BytesRead property to see how many bytes were actually returned by the Read.
PCDGetStream lngCurCount = 0 lngTotCount = 0 'Set our library objDOC.SetProperty "%TARGET_LIBRARY", bstrLib 'Set the DST. objDOC.SetDST bstrDST 'Set the Form (here the Default Profile Form). objDOC.SetObjectType "DEF_PROF" 'Get the document. objDOC.SetProperty "%OBJECT_IDENTIFIER", _ bstrDocNum objDOC.Fetch If objDOC.ErrNumber <> 0 Then ' Error occurred during Fetch. Process it. End If 'Create/Set-up object to get the document. Dim objGetDoc As New PCDGetDoc objGetDoc.SetDST bstrDST objGetDoc.
PCDGetStream lngTotCount = lngTotCount + lngCurCount bytInArray = objGetStream.Read(5120) lngCurCount = objGetStream.BytesRead Wend If (objGetStream <> 0) Then 'Error: Unexpected end to read loop. Else If (lngTotCount > 0) Then MsgBox "Done. File is " & _ CStr(lngTotCount) & _ " Bytes in Length." Else 'Error: Read Failed. Process the error. End If End If Set objDoc = Nothing Set objGetDoc = Nothing Set objGetStream = Nothing . . .
PCDLogin PCDLogin Use this object to create or append validated network aliases to a document security token (DST) Syntax PCDLogin.methodOrProperty Example The section titled Providing Library Access in Chapter 1 illustrates how you can use the PCDLogin object in your documents.
PCDLookup PCDLookup PCDLookup allows you to execute a lookup of data stored in validated SQL columns, such as AUTHOR or DOCUMENTTYPE. You can use PCDLookup to do this in your custom application by specifying: • the data in the fields on the form, and • the lookup ID. PCDLookup returns the same data that would be displayed in the list box of the DM lookup, plus any other columns that would be needed to update related fields on the base form.
PCDLookup Example The following example demonstrates how you can use PCDLookup to create and process a Lookup search. It includes most of the methods that PCDLookup supports. Sub Lookup( ) 'Create our object Dim objPCDLookup As New PCDLookup 'Create a property list Dim objPCDPropList As New PCDPropertyList 'Set up our propertylist so it can be used later. objPCDPropList.AddProperty "AUTHOR_ID", "J_SMITH" 'Set up the parameters for the lookup. 'Set the DST. objPCDLookup.SetDST strDST 'Set the Library.
PCDLookup vbCr & "you selected in the Typist field?" strAns = MsgBox(strPrompt, vbYesNo, strTitle) intAns = CInt(strAns) If intAns = 6 Then 'User answered "Yes." Broaden search. objLookup.AddSearchCriteria “TYPIST_ID", J_SMITH 'Also, delete filter on author name so it 'does not exclude J_SMITH as typist. objLookup.ClearUserFilterCriteria Else If intAns = 7 'User answered "No." Search is OK as is. MsgBox "No change to search criteria." End If 'Set the sort order for results.
PCDLookup 'Unsorted. This assures unsorted results, but 'it may not be required unless there were 'previous searches. objPCDLookup.ClearOrderByProperties End Select 'Set the maximum number of records search returns. objPCDLookup.SetMaxRows 500 'Set the number of records to be returned at 'one time to user’s local cache. objPCDLookup.SetChunkFactor 10 'Execute the lookup objPCDLookup.Execute If objPCDLookup.ErrNumber <> 0 Then 'Error: process it.
PCDLookup lstResultSet.Clear 'Set pointer position to row 0 in the result set. 'NextRow will then increment it to the first data 'row. objPCDLookup.SetRow( 0 ) Do While objPCDLookup.NextRow If objPCDLookup.ErrNumber <> 0 Then 'Error reading data row. Process it. End If 'Set pointer position to row 0 in the metadata 'result set. NextMetaRow will then increment 'it to the first data row. objPCDLookup.SetMetaRow (0) Do While objPCDLookup.NextMetaRow If objPCDLookup.
PCDLookup Loop Loop 'Cleanup... objPCDLookup.ReleaseResults Set objPCDLookup = Nothing Set objPCDPropList = Nothing End Sub . . .
PCDNetAliasList PCDNetAliasList The PCDNetAliasList object stores a list of network aliases. A network alias consists of the following: • a UnitType • a UnitName • a UserName and Password The UnitType is a DM library, or a NetWare 5.x, NetWare 6.x, or Microsoft Network. Depending on the UnitName, the UnitType is either a DM library name, the NetWare server name, the NetWare NDS tree name, or the Windows network domain name, respectively.
PCDNetworkInfo PCDNetworkInfo The PCDNetworkInfo object supports the integration of DM with your network-based security. The methods PCDNetworkInfo supports allow you to build tight network operating system integration into your DM document management system. These methods also allow you to browse network information about domains, groups, and users. Syntax PCDNetworkInfo.
PCDNetworkInfo Public sDST As String Private Sub cbDomain_Click() DomainForm.oNWInfo.SetDST (sDST) DomainForm.Show End Sub Private Sub cbGroupInfo_Click() GroupForm.sDST = sDST GroupForm.oGroupInfo.SetDST (sDST) GroupForm.Show End Sub Private Sub cbQuit_Click() Unload NetInfoBaseForm End Sub Private Sub Form_Load() 'Local Variable declarations. Dim oLogin As New PCDLogin Dim nResult As Long Dim sTempBuf As String 'Login process. nResult = oLogin.AddLogin(0, "MyLibrary", "", "") nResult = oLogin.
PCDNetworkInfo Public oNWInfo As New PCDNetworkInfo Private Sub cbCancel_Click() Unload DomainForm End Sub Private Sub Form_Load() Dim nResult As Long Dim nNumRows As Long 'Load the Domain List. ' %NI_NT indicates this is an NT based OS. ' %UNDEFINED returns all domains from the root. nResult = oNWInfo.GetDomainList("%NI_NT", _ "%UNDEFINED") nNumRows = 0 'If the Domain list has been retrieved, 'get the number of domains in the list.
PCDNetworkInfo nNumRows = oNWInfo.GetRowCount() End If If nNumRows = 0 Then MsgBox "You do not have access to Domain “ _ & “information at this time." Else 'Fill the listbox. For i = 1 To nNumRows nResult = oNWInfo.NextRow() lstDomains.AddItem (oNWInfo.GetValue()) Next i 'Initialize this list to its first element. lstDomains.ListIndex = 0 'Fill up the UserList with Users in this list. nResult = oNWInfo.GetUserList("%NI_NT", _ lstDomains.Text) nNumRows = 0 'Get number of rows that are returned.
PCDNetworkInfo 'Pre-select the first item in the list. lstDomainUserList.ListIndex = 0 End If End If End Sub Private Sub lstDomains_Click() Dim nResult As Long Dim nNumRows As Long 'Clear listbox for results of this call. lstDomainUserList.Clear 'Fill the UserList with Users within this list. nResult = oNWInfo.GetUserList("%NI_NT", _ lstDomains.Text) nNumRows = 0 'Get the number of rows that are returned. If nResult = 0 Then nNumRows = oNWInfo.
PCDNetworkInfo 'Pre-select the first item in the list. lstDomainUserList.ListIndex = 0 End If End Sub Public Public Public Public sDomainName As String sGroupName As String sDST As String oGroupInfo As New PCDNetworkInfo Private Sub cbCancel_Click() Unload GroupForm End Sub Private Sub cbIsMember_Click() Dim nResult As Long nResult = IsMemberForm.oIsMember.
PCDNetworkInfo IsMemberForm.sDomainName = "MyDomain" IsMemberForm.sGroupName = "MyGroup" IsMemberForm.TxtUserID = "Jimmy Jones" IsMemberForm.Show End Sub Private Sub cbGetMembers_Click() Dim nResult As Long 'Before loading the next form use load 'load the next form's Group and Domain 'data members. GroupMembersForm.sGroupName = sGroupName GroupMembersForm.sDomainName = sDomainName 'Set the next form's object DST. nResult = GroupMembersForm.oMembers.SetDST(sDST) GroupMembersForm.
PCDNetworkInfo If nResult = 0 Then nNumRows = oGroupInfo.GetRowCount() End If If nNumRows = 0 Then MsgBox "You do not have access to “ _ & “Domain information at this time." Else 'Fill ListBox with Domain information. For i = 1 To nNumRows nResult = oGroupInfo.NextRow() lstDomains.AddItem (oGroupInfo.GetValue()) Next i 'Initialize Domain list to first element. lstDomains.ListIndex = 0 'This Form data member holds currently 'selected Domain information. sDomainName = lstDomains.Text nResult = oGroupInfo.
PCDNetworkInfo End If End If cbGetMembers.Enabled = False End Sub Private Sub lstDomains_Click() sDomainName = lstDomains.Text lstGroups.Clear 'Fill the UserList with Users in this list. nResult = oGroupInfo.GetGroupList( _ "%NI_NT", sDomainName) nNumRows = 0 'Get the rowcount. If nResult = 0 Then nNumRows = oGroupInfo.GetRowCount() End If 'Display user list in the lstGroups ListBox. If nNumRows = 0 Then MsgBox "User information for this domain “ _ “is not available to you.
PCDNetworkInfo End Sub Private Sub lstGroups_Click() sGroupName = lstGroups.Text cbGetMembers.
PCDNetworkInfo Dim sMember As String Dim nNumRows As Long 'Retrieve the GroupMembers from the network nResult = oMembers.GetGroupMembers( _ "%NI_NT", sDomainName, sGroupName) If nResult = 0 Then 'Get the Group members. nNumRows = oMembers.GetRowCount() If nNumRows = 0 Then MsgBox "No access to Members for this group." Else 'Place all of the members of this group 'in the ListBox. For i = 1 To nNumRows nResult = oMembers.NextRow() lstMembers.AddItem (oMembers.
PCDNetworkInfo Dim nNumRows As Long 'If program is now checking the top of Member 'list from the opening of the form... If nFirstTime > 0 Then '...Clear the Users Groups ListBox. lstUsersGroups.Clear 'Retrieve the selected user’s full name. nResult = oMembers.GetUserFullName( _ "%NI_NT", sDomainName, lstMembers.Text) nResult = oMembers.NextRow() txtFullName.Text = oMembers.GetValue() 'Retrieve all groups that include the 'selected user. nResult = oMembers.GetUserGroups( _ "%NI_NT", sDomainName, lstMembers.
PCDNetworkInfo & “retrieve the Users Groups." End If Else 'This is the first time through. Do not 'retrieve any Group or name information 'for this user ID.
PCDNetworkInfo sUserID = TxtUserID.Text nResult = oIsMember.IsMemberOf( "%NI_NT", _ sDomainName, sUserID, sGroupName) If oIsMember.NextRow() Then sResultValue = oIsMember.GetValue() MsgBox "Positive response to IsMember - " _ & sResultValue & “.” Else MsgBox "NextRow returned false.
PCDPropertyList PCDPropertyList PCDPropertyList is a Messenger object that allows you to store and manipulate a collection of property name/value pairs. PCDPropertyList uses a zero-based index. Loading different name/ value pairs into this object provides a mechanism for your custom applications to send descriptive information from the client interface to the server interface. One example of the use of these properties occurs within the PCDNetworkInfo object.
PCDPropertyList Example The following example shows how you can incorporate the functionality of the GetPropertyList object into an application. Public oGlobalPropertyList As New PCDPropertyList Private Sub cbDelete_Click() Dim nResult As Long Dim nTotalElements As Integer nTotalElements = oGlobalPropertyList.GetSize MsgBox "The Total number of elements in the “ _ & “PCDPropertyList - " + Str(nTotalElements) For i = 1 To nTotalElements nResult=oGlobalPropertyList.NextProperty() nResult=DeleteForm.
PCDPropertyList End Sub Private Sub cbListProperties_Click() Dim nResult As Long Dim nTotalElements As Integer nTotalElements = oGlobalPropertyList.GetSize MsgBox "The Total number of elements in the “ _ & “PCDPropertyList - " + Str(nTotalElements) For i = 1 To nTotalElements nResult=oGlobalPropertyList.NextProperty() nResult=ListForm.oListFormProps.AddProperty( _ oGlobalPropertyList.GetCurrentPropertyName(), oGlobalPropertyList.GetCurrentPropertyValue()) Next i ListForm.
PCDPropertyList For i = 1 To nTotalElements nResult = _ ValueForm.oValueFormProps.AddProperty( _ oGlobalPropertyList.GetCurrentPropertyName(), oGlobalPropertyList.GetCurrentPropertyValue()) nResult = oGlobalPropertyList.NextProperty() Next i ValueForm.Show End Sub 'During the form load, a series of performance 'metadata elements are being loaded into the 'Property list. Private Sub Form_Load() Dim nResult As Long Dim vPropValue As Variant vPropValue = 85 'Load CPU metadata. nResult = oGlobalPropertyList.
PCDPropertyList oGlobalPropertyList.AddProperty( _ "Table Locks", vPropValue) 'If successful, then load the Pages Allocated 'metadata. If nResult = 0 Then vPropValue = 30 nResult = _ oGlobalPropertyList.AddProperty( _ "Pages Allocated", vPropValue) 'If successful then load the Pages Input 'metadata. If nResult = 0 Then vPropValue = 100 nResult = _ oGlobalPropertyList.AddProperty( _ "Pages Input", vPropValue) If nResult <> 0 Then MsgBox "Pages Input Property “ _ & “addition failed.
PCDPropertyList Else MsgBox "CPU Property Addition has failed" End If End Sub Public oValueFormProps As New PCDPropertyList Private Sub cbCancel_Click() Unload ValueForm End Sub Private Sub cbFindValue_Click() Dim nResult As Long Dim sSearchString As String Dim vPropValue As Variant sSearchString = txtPropertyName.Text 'Use the value in the text box to retrieve 'the value of the text box.
PCDPropertyList oValueFormProps.GetPropertyValue( _ sSearchString) 'Report the value of the property. lblValue.Caption = vPropValue lblValue.FontSize = 12 lblValue.FontBold = True End Sub Private Sub Form_Load() txtPropertyName.Text = lblPRopertyName.
PCDPropertyList 'Note that this example retrieves each value 2 'times. Public oListFormProps As New PCDPropertyList Private Sub cbCancel_Click() Unload ListForm End Sub Private Sub Form_Load() Dim nTotalElements As Integer Dim nResult As Long nTotalElements = oListFormProps.GetSize 'Prime the pump by setting the index element to 0 'so program can iterate through the PCDProperties 'array. nResult = oListFormProps.
PCDPropertyList Public nActiveProperty As Integer Public oDeleteProp As New PCDPropertyList Private Sub cbCancel_Click() Unload DeleteForm End Sub Private Sub cbDelete_Click() Dim nResult As Long Dim nTotalRows As Long 'Clear the listbox. lstProperties.Clear 'Delete the property that was selected. nResult = oDeleteProp.
PCDPropertyList 'Determine number of rows in the PCDPropertyList. nTotalRows = oDeleteProp.GetSize() If nTotalRows > 0 Then 'If there are rows in the Property list, get 'ready to retrieve properties from the list. nResult = oDeleteProp.BeginIter() 'Place the property names in the listbox. For i = 1 To nTotalRows lstProperties.AddItem( _ oDeleteProp.GetCurrentPropertyName()) nResult = oDeleteProp.NextProperty() Next i End If lstProperties.ListIndex = 0 nActiveProperty = lstProperties.
PCDPropertyList nResult = oDeleteProp.NextProperty() Next i End If lstProperties.ListIndex = 0 nActiveProperty = lstProperties.ListIndex End Sub Private Sub lstProperties_Click() nActiveProperty = lstProperties.ListIndex End Sub Private Sub cbGetIndex_Click() 'Note: This code above demonstrates the 'GetPropertyIndex call on the PCDPropertyList 'object. You enter the property name ( value ), 'and you are returned the zero-based index of 'that property.
PCDPropertyList Dim Dim Dim Dim nResult As Long nIndex As Long nSize As Long sPropName As String sPropName = txtPropertyName.Text If sPropName = "None" Then MsgBox "Please enter a property before ” _ & “trying to retrieve the index." Else nSize = oIndexFormProps.GetSize() If nSize > 0 Then nIndex = _ oIndexFormProps.GetPropertyIndex( _ sPropName) If nIndex >= 0 And nIndex < nSize Then txtPropertyIndex.
PCDPropertyList GetPropertyValue GetSize NextProperty See the following properties: ErrDescription ErrNumber DM API OBJECTS 95
PCDPropertyLists PCDPropertyLists This object lets you work with a collection of PCDPropertyList objects. Syntax PCDPropertyLists.
PCDPutDoc PCDPutDoc PCDPutDoc allows you to obtain and manage a set of PCDPutStream object pointers that your customized client application can use to write the physical files that make up one version of a DM document to the appropriate DM repository. Syntax PCDPutDoc.methodOrProperty Usage The particular document/version that is to be written is determined by setting search criteria. Normally, this would be the document ID number, the version ID number, and possibly the sub-version identifier.
PCDPutDoc Dim VersionID As Long Dim TotalFileSize As Long Dim TotalBytesWritten As Long Dim Buffread As Long 'Set bdata ridiculously low for test purposes 'to increase the likelihood of corruption. Dim bdata(16) As Byte Dim objDoc As PCDDocObject Set objDoc = New PCDDocObject objDoc.SetProperty "%TARGET_LIBRARY", Library objDoc.SetDST DST 'Set the Profile Form for this document. objDoc.SetObjectType “DEF_PROF” objDoc.SetProperty "DOCNAME", "Upload Test Doc" objDoc.SetProperty "APP_ID", "MS WORD" objDoc.
PCDPutDoc objPutDoc.AddSearchCriteria _ "%TARGET_LIBRARY", Library objPutDoc.AddSearchCriteria _ "%DOCUMENT_NUMBER", DocNumber objPutDoc.AddSearchCriteria "%VERSION_ID", _ VersionID objPutDoc.Execute If objPutDoc.ErrNumber <> 0 Then Debug.Print objPutDoc.ErrNumber, _ objPutDoc.ErrDescription Exit Sub End If objPutDoc.NextRow Dim objPutStream As Object Set objPutStream = _ objPutDoc.GetPropertyValue("%CONTENT") Dim FileName FileName = txtFileName.Text Debug.
PCDPutDoc Else TotalFileSize = TotalBytesWritten End If Get #1, , bdata objPutStream.Write bdata, TotalBytesWritten Debug.Print TotalBytesWritten, _ objPutStream.BytesWritten, _ objPutStream.ErrNumber, _ objPutStream.ErrDescription TotalBytesWritten = TotalFileSize - _ TotalBytesWritten End If Wend objPutStream.SetComplete Close #1 Set objPutSteam = Nothing Set objDoc = Nothing Set objDoc = New PCDDocObject objDoc.SetDST DST objDoc.SetObjectType “DEF_PROF” objDoc.
PCDPutDoc Related Items See the following methods: AddSearchCriteria Execute GetPropertyValue GetReturnProperties GetRowsFound GetSearchCriteria NextRow SetDST SetRow SetSearchCriteria SetSearchObject See the following properties: ErrDescription ErrNumber DM API OBJECTS 101
PCDPutStream PCDPutStream Use PCDPutStream to provide users with the ability to write the contents of physical files to disk. Syntax PCDPutStream.methodOrProperty Usage After each write, you should check the ErrNumber property, which should be zero (S_OK). If your write was error-free, you should check the BytesWritten property to see how many bytes were actually written to the physical file.
PCDRecentDoc PCDRecentDoc Use the PCDRecentDoc object to retrieve recently edited documents from your DM Repository. Syntax PCDRecentDoc.methodOrProperty Usage PCDRecentDoc is similar to PCDSearch in how it operates, except that it automatically links to the ACTIVITYLOG table based on the value of the AUTHOR and TYPIST columns. It filters any rows it returns to only include those that have unique entries.
PCDRecentDoc Related Items See the following methods: AddOrderByProperty AddReturnMetaProperty AddReturnProperty AddSearchCriteria AddSearchLib BeginGetBlock ColumnCount EndGetBlock Execute GetMetaPropertyValue GetMetaRowsFound GetPropertyValue GetReturnProperties See the following properties: ErrDescription ErrNumber 104 CHAPTER 3 GetRowsFound GetSearchCriteria NextMetaRow NextRow ReleaseResults SetChunkFactor SetDST SetMaxRows SetMetaRow SetReturnProperties SetRow SetSearchCriteria SetSearchObject
PCDSearch PCDSearch PCDSearch provides the user with the ability to enter criteria to execute a search of the available document servers in your DM file store. You can use this object to execute the search, then retrieve the results by randomly or sequentially accessing the data rows that are returned. You access a returned data item by referring to its property name. Syntax PCDSearch.methodOrProperty Example The following example shows how to create an instance of the PCDSearch object. . . .
PCDSearch See the following properties: ErrDescription ErrNumber 106 CHAPTER 3
PCDSQL PCDSQL The PCDSQL object allows direct access to SQL tables that support the DM document management system. Caution: The PCDSQL object and the methods it supports provide a set of powerful tools that allow you to modify the SQL database that supports your DM system. However, with this power also comes the power to damage or destroy the SQL database tables that DM uses to control your document management environment.
PCDSQL that allows the document security token (DST) to be shared throughout the entire application. 'These are the Project-wide Global variables. Private msDST As String Private Sub Class_Initialize() 'msDST will be used to handle the DST. msDST = "" End Sub 'Used to set the DST within the DocInternal Class. Public Sub SetDST(sInputString As String) msDST = sInputString End Sub 'Used to retrieve the DST from the DocInternal 'Class.
PCDSQL 'This will be shared throughout this form. Public oDIC As New DocInternalClass Private Sub cbNextKey_Click() NextKeyForm.oNextKey.SetDST( oDIC.GetDST() ) NextKeyForm.Show End Sub Private Sub cbNoDST_Click() DSTForm.Show End Sub Private Sub cbQuit_Click() Dim oForm As Form For Each oForm In Forms Unload oForm Next oForm End Sub Private Sub cbSelectTest_Click() 'Pass the DST from the Base form to 'the SelectForm's PCDSQL object. SelectForm.oSelectSQL.SetDST( oDIC.GetDST() ) SelectForm.
PCDSQL Dim Dim Dim Dim sBuffer As String oLogin As New PCDLogin nResult As Long sTempBuf As String 'Login process. nResult = oLogin.AddLogin(0, "MyLibrary", "", "") nResult = oLogin.AddLogin(0, "MyDomain", _ "MyUserID", "MyPassword") ' 'If your API application is licensed by Hummingbird 'to use SQL pass-through functionality when SQL 'pass-through functionality is disabled for general 'users, you should replace the previous 2 lines of 'code with the following two lines of code: ' nResult = oLogin.
PCDSQL 'because without the Document Security Token 'being set within the object, the verification of 'the 'MyUserName' would have failed. The call 'oSelectSQL.SetDST sets the value of the m_zDST 'protected Data Member. This holds true throughout 'this application. Public oSelectSQL As New PCDSQL Private Sub Cancel_Click() Dim nResult As Long 'Release the result set all resources associated 'with the result set and the PCDSQL object.
PCDSQL nResult = oSelectSQL.ReleaseResults() Unload SelectForm End Sub Private Sub cbSelect_Click() 'Local Variable Declarations. Dim nNumRows As Long Dim nColumnCount As Long Dim nResult As Long Dim sTempBuf As String 'Run a simple Query to return a couple of 'columns of data. nResult = oSelectSQL.Execute("SELECT USER_ID, _ FULL_NAME FROM DOCSADM.PEOPLE") 'Retrieve column count from the result set. nColumnCount = oSelectSQL.
PCDSQL oSelectSQL.GetColumnValue(j)) Next j Next i End Sub Private Sub Form_Load() 'Set the default values for the labels above 'the columns. lblColumnName(0).Caption = "First Column" lblColumnName(1).Caption = "Second Column" 'Set the library that the query will use. oSelectSQL.SetLibrary("MyLibrary") End Sub Private Sub Form_Unload(Cancel As Integer) Dim nResult As Long Dim sBuf As String 'Clear the result set as the object goes 'out of scope. nResult = oSelectSQL.
PCDSQL Public oUpdateSQL As New PCDSQL Private Sub cbCancel_Click() Dim nResult As Long 'Release the result set for this instance of 'the PCDSQL object. nResult = oUpdateSQL.
PCDSQL Dim nResult As Long Dim nRowCount As Long 'Determine which row is being updated. 'Then, load the data from the text box. nRowNumber = UpdateForm.lstUserIDs.ListIndex nRowNumber = nRowNumber + 1 nResult = oUpdateSQL.SetRow(nRowNumber) sTempBuf = oUpdateSQL.GetColumnValue(1) sSQL = "UPDATE DOCSADM.PEOPLE SET FULL_NAME = '" _ & txtFullName.Text & "' WHERE USER_ID = '" _ sTempBuf + "'" nResult = oUpdateSQL.
PCDSQL 'Set the Library. If nResult = 0 Then nResult = oUpdateSQL.SetLibrary("MyNewLibrary") Else MsgBox ("The SetDST call failed.") End If 'This function does not return a SUCCESS/FAILURE 'value. Instead, it returns the numeric value of 'the DB Vendor. If nResult = 0 Then nResult = oUpdateSQL.GetDBVendor() Else MsgBox ("SetLibrary call failed") End If 'This SQL statement retrieves two columns. nResult = oUpdateSQL.Execute( "SELECT “ _ & “USER_ID, FULL_NAME FROM DOCSADM.
PCDSQL txtFullName.Text = oUpdateSQL.GetColumnValue(2) End Sub Private Sub lstUserIDs_Click() Dim nListIndex As Long Dim sTempBuf As String Dim nRowIndex As Long nListIndex = lstUserIDs.ListIndex 'The SQL row is one larger than the list index, 'so, add one to set the SQL row index. nRowIndex = nListIndex + 1 nResult = oUpdateSQL.SetRow(nRowIndex) 'This is the full name column value. sTempBuf = oUpdateSQL.GetColumnValue(2) txtFullName.
PCDSQL Dim sDST As String Dim oDSTDIC As New DocInternalClass Dim oDSTLogin As New PCDLogin Public oDSTSQL As New PCDSQL Private Sub cbCancel_Click() Dim nResult As Long sDST = "" nResult = oDSTSQL.ReleaseResults() Unload DSTForm End Sub Private Sub cbDoQuery_Click() nResult = oDSTSQL.
PCDSQL & “DOCSADM.PROFILE") If nResult = 0 Then NextRowForm.sNRDST = oDSTDIC.GetDST() NextRowForm.Show Else MsgBox ("Query Failed") End If End Sub Private Sub cbSetDST_Click() Dim nResult As Long 'Do mandatory login process in order to get a DST. nResult = oDSTLogin.AddLogin(0, "MyLibrary", _ "", "") nResult = oDSTLogin.AddLogin(0, "MyDomain", _ "MyUser", "MyPassword") nResult = oDSTLogin.Execute() sDST = oDSTLogin.GetDST() 'Get and display the DST. oDSTSQL.SetDST(sDST) oDSTDIC.
PCDSQL Public Public Public Public oNRSQL As New PCDSQL nNumRows As Long nNumCols As Long nRowsViewed As Long Private Sub cbCancel_Click() Dim nResult As Long 'Tidy up by releasing the result set. sNRDST = "" nResult = oNRSQL.ReleaseResults() 'Close this form.
PCDSQL End Sub Private Sub cbNextRow_Click() Dim nResult As Long 'Increment the nRowsViewed count. nRowsViewed = nRowsViewed + 1 'Go to the next row. nResult = oNRSQL.NextRow() For i = 1 To nNumCols lblResultData(i - 1).Caption = _ oNRSQL.GetColumnName(i) txtResultData(i - 1).Text = _ oNRSQL.GetColumnValue(i) Next i 'If at end of record set, deactivate the button. If nRowsViewed = nNumRows Then cbNextRow.
PCDSQL If nResult = 0 Then nNumRows = oNRSQL.GetRowCount() 'If there are more than one row then lets do it. If nNumRows > 0 Then nNumCols = oNRSQL.GetColumnCount() 'Add the appropriate elements to the 'control array. For i = 1 To nNumCols lblResultData(i - 1).Caption = _ oNRSQL.GetColumnName(i) txtResultData(i - 1).Text = _ oNRSQL.GetColumnValue(i) Next i End If End If 'Check the number of rows coming back. 'If more than one, then enable the 'cbNextRow button. If nNumRows > 1 Then cbNextRow.
PCDSQL Public oNextKey As New PCDSQL Private Sub cbCancel_Click() Unload NextKeyForm End Sub Private Sub cbNextKey_Click() Dim sResult As String sResult = oNextKey.GetNextKey("") txtNextKey.
PCDSQL Related Items See the following methods: Execute GetColumnCount GetColumnName GetColumnValue GetDBVendor GetNextKey GetRowCount See the following properties: ErrDescription ErrNumber 124 CHAPTER 3 GetRowsAffected GetSQLErrorCode NextRow ReleaseResults SetDST SetLibrary SetRow
PCDTrusteeList PCDTrusteeList Use PCDTrusteeList to manipulate the trustee list associated with DM. Syntax PCDTrusteeList.methodOrProperty Example The following example shows how to create an instance of the PCDTrusteeList object. . . . pTrustees = Server.CreateObject( _ "PCDClient.PCDTrusteeList") . . .
PCDTrusteeList 126 CHAPTER 3
C h a p t e r 4 DM API Methods and Properties In This Chapter This chapter describes the methods and properties associated with the objects that the DM supports, including their syntax, usage, and other related information.
AddLogin AddLogin Use this method to set the logon information that gets passed to the DM Server. The DM Server authenticates the logon information when the Execute() method is called. Syntax PCDLogin.AddLogin( intNetworkType, _ strUnitName, _ strUserName, _ strPassword ) Parameters intNetworkType The network type of the network alias.
AddLogin 'dimensioned as constants. Const iLibraryLogin As Const iNetWareBindery As Const iNetWareNDS As Const iMicrosoftNetwork As Integer Integer Integer Integer = = = = 0 1 2 8 'Create an instance of the logon object. pClient = Server.CreateObject("PCDClient.PCDLogin") 'Use the Attaché password to log on to the 'LegalLaw library. hr = pClient.AddLogin iLibraryLogin, _ "LegalLaw", "t_rex", "roar" 'The DM Server authenticates the logon. hr = pClient.Execute() . . .
AddLogin 'DM API supports. MyLoginType.LIBRARY_LOGIN MyLoginType.NETWORK_BINDERY MyLoginType.NETWORK_NDS MyLoginType.MS_NETWORK = = = = 0 1 2 8 'Create an instance of the logon object. Dim pClient As PCDLogin Set pClient = New PCDLogin 'Get the Library, User Name, and Password from 'the form. Dim Library As String Dim User As String Dim Password As String Library = txtLib.Text User = txtUser.Text Password = txtPassword.Text 'Use the Attaché password to log on to 'the indicated library.
AddLogin End Sub . . .
AddLoginLicensed AddLoginLicensed The “Allow SQL Passthrough” setting in the DM system parameter settings dialog can be used to deny access to the SQL passthrough functions that the PCDSQL object supports. However, commercial applications by third-party partners of Hummingbird can receive a license key that allows their applications to access the PCDSQL object regardless of the SQL passthrough setting.
AddLoginLicensed Parameters intNetworkType The network type of the network alias. Valid values are: Library Logon (No Network) 0 NetWare Bindery 1 NetWare NDS 2 Microsoft Network 8 strUnitName The DM library name, NetWare server name, NDS tree name, or Windows domain, workgroup, or server name. strUserName The user name for the specified unit. strPassword The password for the specified user. strApplicationID The application ID that was assigned by Hummingbird.
AddLoginLicensed strMyDomain, strMyUserID, _ strMyPassword, strAppID, _ strLicenseKey ) oPCDLogin.Execute . . .
AddOrderByProperty AddOrderByProperty AddOrderByProperty allows you to set the order that search results are returned to you. Syntax PCDLookup.AddOrderByPropery( strPropName, _ blnAscending ) PCDRecentDoc.AddOrderByProperty( strPropName, _ blnAscending ) PCDSearch.AddOrderByPropery( strPropName, _ blnAscending ) Parameters strPropName The name of the property by which to order the results of a search.
AddOrderByProperty 'Create the search object. Dim pSearch As New PCDSearch 'Set the document security token (DST). pSearch.SetDST strDST 'Add a search Library to search. pSearch.AddSearchLib "LegalLaw" 'Set which form to use for the search. pSearch.SetSearchObject "def_qbe" 'Add properties you want the search to return. pSearch.AddReturnProperty "docname" pSearch.AddReturnProperty "docnum" pSearch.AddReturnProperty "AUTHOR_ID" 'Sort the search results by AUTHOR_ID in 'ascending order. pSearch.
AddProperty AddProperty Use this method to add a property/value pair to a property value list. Syntax PCDPropertyList.AddProperty( strPropName, _ vntPropVal ) Parameters strPropName The string that identifies the name of the property to add to the list. vntPropVal The VARIANT that contains the value of the property that is to be added to the list. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success.
AddReturnMetaProperty AddReturnMetaProperty The AddReturnMetaProperty method allows you to retrieve information about the data requested in a search. For example, your custom application can use AddReturnMetaProperty to determine if an object returned in your search result set is supposed to be visible to the user or not. The available metadata properties are %PropertyName, %Title, %Visible, and %Data.
AddReturnMetaProperty Parameter strPropName The name of the property to be returned in the results. This should be one of the four properties listed above. Returns Returns a VARIANT return value that contains the value of the requested property.
AddReturnProperty AddReturnProperty Use this method to add a property to the list of objects that you want a search to return to you. No data is returned by default. Your search will return no data unless you call AddReturnProperty at least one time before you execute your search. Syntax PCDRecentDoc.AddReturnProperty( strPropName ) PCDSearch.AddReturnPropery( strPropName ) Parameter strPropName The name of the property to be returned in the results.
AddReturnProperty pSearch.SetDST( strDST ) 'Add the Library you want to search. pSearch.AddSearchLib( "LegalLaw" ) 'Specify the form to use for this search. pSearch.SetSearchObject( "def_qbe" ) 'Add the properties you 'to return. pSearch.AddReturnProperty pSearch.AddReturnProperty pSearch.AddReturnProperty want the search "docname" "docnum" "AUTHOR_ID" 'Execute the Search. pSearch.Execute . . .
AddSearchCriteria AddSearchCriteria Use this method to add a property name with search criteria to the search. Syntax PCDGetDoc.AddSearchCriteria( strPropName, _ strCriteria ) PCDLookup.AddSearchCriteria( strPropName, _ strCriteria ) PCDPutDoc.AddSearchCriteria( strPropName, _ strCriteria ) PCDRecentDoc.AddSearchCriteria( strPropName, _ strCriteria ) PCDSearch.AddSearchCriteria( strPropName, _ strCriteria ) Parameters strPropName The name of the property on which to base the search.
AddSearchCriteria DST = pClient.GetDST() 'Now that you have the DST, create a search object. pSearch = Server.CreateObject( _ "PCDClient.PCDSearch") 'Pass the DST to the search object. pSearch.SetDST( DST ) 'Add a search Library to the search. pSearch.AddSearchLib("LegalLaw") 'Specify the form to use for this search. pSearch.SetSearchObject("def_qbe") 'Add the return properties you want returned. pSearch.AddReturnProperty("docname") pSearch.AddReturnProperty("docnum") pSearch.
AddSearchCriteria Related Items See the following objects: PCDGetDoc PCDLookup PCDPutDoc PCDRecentDoc PCDSearch See the following properties: ErrDescription ErrNumber 144 CHAPTER 4
AddSearchLib AddSearchLib Use this method to add a library name to the list of libraries to search. Your search will return no data unless you call AddSearchLib at least one time before you execute your search. Syntax PCDLookup.AddSearchLib( strLibName ) PCDRecentDoc.AddSearchLib( strLibName ) PCDSearch.AddSearchLib( strLibName ) Parameter strLibName The name of the library to search.
AddSearchLib 'Pass the DST to the search object. pSearch.SetDST( DST ) 'Get the search library from the form. searchLib = txtLibrary.Text 'Add the Search Library to the Search object. pSearch.AddSearchLib(searchLib) 'Execute the search. pSearch.Execute . . .
AddTrustee AddTrustee Use this method to add a trustee to the trustee list. If there is already a trustee in the list that matches the trustee name and flags, the rights for the existing entry will be updated rather than a new entry added. Syntax PCDTrusteeList.AddTrustee( strTrusteeName, _ intTrusteeFlags, _ intTrusteeRights ) Parameters strTrusteeName The (BSTR) input string with the name of the trustee. intTrusteeFlags Input integer with the trustee flags.
AddTrustee BeginIter DeleteTrustee GetCurrentTrusteeFlags GetCurrentTrusteeName GetCurrentTrusteeRights GetSize GetTrusteeIndex GetTrusteeRights NextTrustee See the following properties: ErrDescription ErrNumber 148 CHAPTER 4
AddUserFilterCriteria AddUserFilterCriteria Use this method to add a property name with user filter criteria to a lookup. Syntax PCDLookup.AddUserFilterCriteria( strPropName, _ strCriteria ) Parameters strPropName The name of the property on which to base the search. strCriteria The property value on which to search. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
BeginGetBlock BeginGetBlock Use this method to tell the object that you are beginning a block of “Get” operations so that it will hold the results until EndGetBlock is called. Normally, the result set is released and recreated on each call to, for example, GetPropertyValue. The results remain cached on the server, but the interface is normally released to prevent it from timing out.
BeginIter BeginIter Use this method to position the current pointer to the first position in a list. This method begins a BeginIter()/NextProperty(), a BeginIter/ NextRow, or a BeginIter()/NextTrustee() loop. Syntax PCDPropertyList.BeginIter() PCDPropertyLists.BeginIter() PCDTrusteeList.BeginIter() Returns It returns S_OK as an HRESULT if it successfully positioned on a list entry, and returns PCD_S_END_OF_LIST if the list is empty. JavaScript, Visual Basic, and VBScript return this as a function value.
BeginIter ErrDescription ErrNumber 152 CHAPTER 4
BytesRead BytesRead This property is always set during a Read operation. It contains the number of bytes returned by the call to the Read method. Syntax PCDGetStream.BytesRead() Returns Returns the number of bytes read during a Read operation. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The section titled Fetching a DM Document Object in Chapter 1 illustrates how to use this method. Related Items See the PCDGetStream object.
BytesWritten BytesWritten This property is always set during a Write operation. It contains the number of bytes written to disk by the call to the Write method. Syntax PCDPutStream.BytesWritten() Returns Returns the number of bytes written during a Write operation. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The Example in PCDPutDoc illustrates the use of this object. Related Items See the PCDPutStream object.
ClearOrderByProperties ClearOrderByProperties Use this method to clear properties used to order results from a lookup. Syntax PCDLookup.ClearOrderByProperties() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The Example in the discussion of the PCDLookup object illustrates how you can use this method in your custom applications. Related Items See the PCDLookup object.
ClearUserFilterCriteria ClearUserFilterCriteria Use this method to clear user filter criteria from a lookup. Syntax PCDLookup.ClearUserFilterCriteria() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The Example in the discussion of the PCDLookup object illustrates the use of this method. Related Items See the PCDLookup object.
Clone Clone This method clones a duplicate copy of the current PCDEnumPropertyLists object. Syntax PCDEnumPropertyLists.Clone() Returns This object returns a pointer to the newly cloned PCDEnumPropertyLists object. Related Items See the PCDEnumPropertyLists object.
ColumnCount ColumnCount Use this method to return the number of columns in the return data. This will always be equal to or greater than the number of times AddReturnProperty is called. (In some situations, the DM API returns extra columns by default, which can increase the ColumnCount value.) Syntax PCDLookup.ColumnCount() PCDRecentDoc.ColumnCount() PCDSearch.ColumnCount() Returns Returns the column count as an integer.
Create Create Use this method to create the object that has been identified by the SetObjectType method. Syntax PCDDocObject.Create() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The Example in the discussion of the PCDPutDoc object illustrates the use of this method. Related Items See the PCDDocObject object.
Delete Delete Use this method to delete the DM object described by the information that has been set. Syntax PCDDocObject.Delete() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Related Items See the PCDDocObject object.
DeleteProperty DeleteProperty Use this method to delete a property from the property list based on its index (relative) position in the list. DeleteProperty uses a zero-based index. After an item is deleted from the list, the list repacks itself. Syntax PCDPropertyList.DeleteProperty( lngNdx ) Parameter lngNdx The index value that identifies the relative position of the property to delete. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success.
DeleteProperty AddProperty BeginIter GetCurrentPropertyName GetCurrentPropertyValue GetPropertyIndex NextProperty See the following properties: ErrDescription ErrNumber 162 CHAPTER 4
DeleteTrustee DeleteTrustee Use this method to delete from the list of trustees a trustee at a given offset. Syntax PCDTrusteeList.DeleteTrustee( lngNdx ) Parameter lngNdx An unsigned long integer that is set to the offset into the list of trustees that identifies the trustee that is to be deleted. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
EndGetBlock EndGetBlock EndGetBlock informs the server that you finished retrieving a series of items. This allows the DM API to release the result set to minimize the possibility of time outs in other operations that may be pending. Syntax PCDRecentDoc.EndGetBlock() PCDSearch.EndGetBlock() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
ErrDescription ErrDescription This property provides a text description of the status from the last call. All DM API objects inherit this property. Syntax PCDError.ErrDescription Returns Returns a string value (BSTR) to receive the error description. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example This reference guide contains many examples that show the use of the ErrDescription property, starting with the Providing Library Access section in Chapter 1.
ErrNumber ErrNumber This property provides a numeric status that identifies any error condition resulting from the last call. Syntax PCDError.ErrNumber Returns Returns a pointer to a long integer to receive the numeric status. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example This reference guide contains many examples that show the use of the ErrNumber property, starting with the The Logon Process section in Chapter 1.
Execute Execute The Execute method is supported for use in many API objects. After you set any necessary criteria or other values (for example, logon information or a search form), use this method to execute the request on the DM Server. Syntax PCDASPFileUpload.Execute() PCDGetDoc.Execute() PCDGetLoginLibs.Execute() PCDLogin.Execute() PCDLookup.Execute() PCDPropertyLists.Execute() PCDPutDoc.Execute() PCDRecentDoc.Execute() PCDSearch.Execute() PCDSQL.
Execute Example This reference guide contains many examples that show the use of the Execute method, starting with the The Logon Process section in Chapter 1.
Fetch Fetch Use this method to retrieve information about an object. Syntax PCDDocObject.Fetch() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example Several examples in this reference guide use the Fetch method. The section titled Fetching a DM Document Object in Chapter 1 is particularly illustrative. Related Items See the PCDDocObject object.
FetchTrustees FetchTrustees Use this method to fetch trustees from the DM Server. Syntax PCDDocObject.FetchTrustees() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The following example illustrates how you can use the FetchTrustees method when managing trustee rights on your document objects. . . .
FetchTrustees Set objDOC = CreateObject( _ "PCDClient.PCDDocObject") 'Create the property list object. Dim objPropList As New PCDPropertyList 'Set the library. objDOC.SetProperty "%TARGET_LIBRARY", strLib 'Set the DST. objDOC.SetDST strDST 'Set the Form. objDOC.SetObjectType "DEF_PROF" 'Identify the document object whose trustee 'properties are to be updated. objDOC.SetProperty "%OBJECT_IDENTIFIER", _ txtDocNum.Text 'Create variables to store security data.
FetchTrustees 'Does the document have security? ' 0 = no; 1 = yes LDefaultRights = _ objPropList.GetPropertyValue("SECURITY") 'Determine the effective rights of the user 'who is currently logged on. LEffectiveRights = _ objPropList.GetPropertyValue( _ "%EFFECTIVE_RIGHTS") 'Determine whether the user who is currently 'logged on has rights to edit the security 'settings of this document: 0 = no; 1 = yes LAccessControl = objDOC.
FetchTrustees & "permission to edit the security of " _ & "this document: " & txtDocNum.Text End If lstResultSet.AddItem "Trustees were updated.
GetAliasList GetAliasList Use this method to get a pointer to the PCDNetAliasList object that contains a list of all the network aliases that the DM Server has validated. Syntax PCDLogin.GetAliasList() Returns Returns a pointer to a PCDNetAliasList object. Check the ErrNumber property for any errors that may have occurred. Example The GetAliasList method is used in the section about Providing Library Access in Chapter 1.
GetAt GetAt Use this method to get a Library name string at a specific index in the list of logon libraries. Syntax PCDGetLoginLibs.GetAt( lngIndx ) Parameters lngIndx A long integer that identifies the index value of the library being requested. Example The section that discusses Getting a List of Available Libraries in Chapter 1 shows how you can use the GetAt method in your applications. Returns Returns a pointer to a VARIANT to receive the library name string.
GetColumnCount GetColumnCount The GetColumnCount method retrieves the number of SQL columns in a result set. It references the current result set within the PCDSQL object. Syntax PCDSQL.GetColumnCount() Returns The GetColumnCount method returns a long integer that shows the number of columns in the current result set. If an INSERT or UPDATE SQL command is run, then GetColumnCount returns the number of columns in the insert or update call.
GetColumnName GetColumnName This method retrieves the name of the specified column in the current SQL result set. Syntax PCDSQL.GetColumnName( lngColNum ) Parameter lngColNum A long integer that corresponds to the column number of the desired column name. Returns The GetColumnName method returns a variant variable that contains the name of the SQL column of interest. GetColumnName returns an empty variant when asked to return erroneous data.
GetColumnValue GetColumnValue This method retrieves the data contents of the specified column in the current SQL result set. Syntax PCDSQL.GetColumnValue( lngColNum ) Parameter lngColNum A long integer that corresponds to the column number of the desired column value. Returns The GetColumnValue method returns a variant variable that contains the data contained in the SQL column of interest. GetColumnValue returns an empty value when asked to return erroneous data.
GetCurrentPropertyName GetCurrentPropertyName Use this method to get the name of the property to which the current property pointer points. The PCDPropertyList object maintains a current property pointer so that you can iterate through the entire list of stored properties without knowing their names. The PCDPropertyLists object also supports this method as a way to access properties in a collection of property lists. Syntax PCDPropertyList.GetCurrentPropertyName() PCDPropertyLists.
GetCurrentPropertyValue GetCurrentPropertyValue Use this method to get the value of the property to which the current property pointer points. The PCDPropertyList maintains a current property pointer so that you can iterate through the entire list of stored properties without knowing their names. The PCDPropetyLists object also supports this method as a way to access property values in a collection of property lists. Syntax PCDPropertyList.GetCurrentPropertyValue() PCDPropertyLists.
GetCurrentTrusteeFlags GetCurrentTrusteeFlags Use this method in a BeginIter/NextTrustee loop to get the trustee flags set for the current entry in the list. Syntax PCDTrusteeList.GetCurrentTrusteeFlags() Returns Returns a pointer to an integer to receive the trustee flags that have been set. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
GetCurrentTrusteeName GetCurrentTrusteeName Use this method in a BeginIter/NextTrustee loop to get the trustee name for the current entry in the list. Syntax PCDTrusteeList.GetCurrentTrusteeName() Returns Returns a string (BSTR) with the trustee name. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Related Items See the PCDTrusteeList object.
GetCurrentTrusteeRights GetCurrentTrusteeRights Use this method in a BeginIter/NextTrustee loop to get the trustee rights for the current entry in the list. Syntax PCDTrusteeList.GetCurrentTrusteeRights() Returns Returns a pointer to an integer to receive the trustee rights for the current trustee. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Related Items See the PCDTrusteeList object.
GetDBVendor GetDBVendor The GetDBVendor method retrieves the numeric identifier associated with the SQL database software in use with the current DM library. Syntax PCDSQL.GetDBVendor() Returns GetDBVendor returns a long integer that identifies the type of the current SQL database software.
GetDomainList GetDomainList This method allows you to retrieve a list of all other network domains that are accessible from the network identified as the root domain. Syntax PCDNetworkInfo.GetDomainList( strNetworkOS, _ strRootDomain ) Parameters strNetworkOS strRootDomain A string variable that identifies the network operating system that is currently running.
GetDomainList ErrDescription ErrNumber 186 CHAPTER 4
GetDOCSUserName GetDOCSUserName After calling PCDLogin.Execute, use this method to determine the DM USER_ID with which the user was logged on to the DM library. Syntax PCDLogin.GetDOCSUserName() Returns Returns a string value that contains the DM USER_ID. Related Items See thePCDLogin object.
GetDST GetDST Use this method to get the document security token (DST) that the server returns after a call to the Execute method of the PCDLogin object. You need to save the returned DST to use it in subsequent transactions. Syntax PCDLogin.GetDST() Returns Returns a string value that contains the DST. Usage The DST is a unique string returned from the DM Server and is valid while the user is logged on to the server.
GetFailedLoginList GetFailedLoginList Use this method to get a PCDNetAliasList object pointer to an object containing a list of the supplied network aliases that did not pass network-level validation. This is only useful after Execute method of the PCDLogin object has been called. Syntax PCDLogin.GetFailedLoginList() Returns The GetFailedLoginList method returns a variant object that contains information about failed logon attempts.
GetFailedLoginList See the following properties: ErrDescription ErrNumber 190 CHAPTER 4
GetGroupList GetGroupList The GetGroupList method populates the result set with a list of the various groups that exist within a particular domain. There are two types of groups: distribution and security. Each is an instance of the Group object, and each contains a collection of attributes that describe group properties and group members. Syntax PCDNetworkInfo.
GetGroupList ErrDescription ErrNumber 192 CHAPTER 4
GetGroupMembers GetGroupMembers This method retrieves the user IDs that are present in the specified group. There is a hierarchy running from Domain to Group. Syntax PCDNetworkInfo.GetGroupMembers( strNetworkOS, _ strDomainName, _ strGroupName ) Parameters strNetworkOS A string variable that identifies the network operating system that is currently running.
GetGroupMembers See the following properties: ErrDescription ErrNumber 194 CHAPTER 4
GetLoginLibrary GetLoginLibrary Use this method to retrieve the name of the DM library where the user is currently logged on. Syntax PCDLogin.GetLoginLibrary() Returns Returns a string that contains the name of the DM library where the user is currently logged on. Example The Providing Library Access section in Chapter 1 illustrates the use of the GetLoginLibrary method. Related Items See the PCDLogin object.
GetMetaPropertyValue GetMetaPropertyValue Use this method to get the value of a property from metadata that is returned when a search or lookup is executed. Syntax PCDLookup.GetMetaPropertyValue( strPropName ) PCDRecentDoc.GetMetaPropertyValue( strPropName ) PCDSearch.GetMetaPropertyValue( strPropName ) Parameter strPropName The name of the property to be returned in the results. It should be one of those described below.
GetMetaPropertyValue • %Visible is a flag indicating whether or not this Lookup list box column should be displayed to the user. • %Data is the value of this column in the current row of the Lookup data (as opposed to the metadata). For example, %PropertyName could return “AUTHOR_ID”, and %Data could return “J_SMITH”. For PCDRecentDoc and PCDSearch, each row in the metadata property list offers the following information: • %PropertyName is the name of the property as shown on the base form.
GetMetaRowsFound GetMetaRowsFound Use this method to identify the total number of rows of metadata that are returned when your search or lookup executes. Syntax PCDLookup.GetMetaRowsFound() PCDRecentDoc.GetMetaRowsFound() PCDSearch.GetMetaRowsFound() Returns Returns a long integer that contains the number of rows of metadata in the result set that your search or lookup returned.
GetMetaRowsFound Related Items See the following objects: PCDLookup PCDRecentDoc PCDSearch See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 199
GetNextKey GetNextKey GetNextKey generates the next numeric value for a primary key column in the SQL database. This is true for all SQL database software that DM supports. However, the manner in which the GetNextKey method functions in an Oracle database environment differs slightly from how it functions in a Microsoft or a Sybase database environment. The Usage section will note these differences. Syntax PCDSQL.
GetNextKey Most of the tables in the DM SQL database have a SYSTEM_ID column as their primary key. DM generates primary key values for new rows in those tables by calling the GetNextKey method with no input parameter. Primary key values that are generated with no input parameter receive their key value from the TBNAME column that has a value of SYSTEMKEY. Because so many tables obtain their primary key values from this pool of numbers, the generic name of SYSTEMKEY is used. There is no SYSTEMKEY table.
GetNextKey following exceptions: —The SYSTEMKEY column is maintained in Oracle as the SEQSYSTEMKEY sequence key. —Other primary keys have the table name that was passed to the GetNextKey method, but with “SEQ” as a prefix. So, the NEEDS_INDEXING primary key is stored in Oracle in the SEQNEEDS_INDEXING sequence. However, your custom applications access the GetNextKey method in the exact same manner regardless of the database software you are using.
GetPrimaryGroup GetPrimaryGroup Use this method to get the DM GROUP_ID that identifies the user’s primary group. You must make a call to PCDLogin.Execute before you can get the primary group. Syntax PCDLogin.GetPrimaryGroup() Returns Returns a string that contains the primary group ID. Usage A user can be a member of many groups in a DM library; however, a user’s primary group determines which library maintenance system parameter settings apply to that user.
GetProperties GetProperties Use this method to create a PCDPropertyList object and to copy the properties in the PCDDocObject’s internal list into it. Syntax PCDDocObject.GetProperties() PCDPropertyLists.GetProperties() Returns Returns an output buffer to receive the PCDPropertyList object pointer. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
GetProperty GetProperty Use this method to get the value of a property. This value may have been previously set with the SetProperty method, or it may have been returned in a call to the Fetch method. Syntax PCDDocObject.GetProperty( strPropName ) PCDPropertyLists.GetProperty( strPropName ) Parameter strPropName The string (BSTR) variable that contains the name of the property for which GetProperty is to return the value.
GetPropertyIndex GetPropertyIndex Use this method to get the property index of a named property. Check the ErrNumber property after calling this method to verify that the return value is valid. Syntax PCDPropertyList.GetPropertyIndex( strPropName ) Parameter strPropName A string value that contains the name of the property for which GetPropertyIndex is to return the index value. Returns Returns an integer that identifies the location of the specified property in the index array.
GetPropertyIndex Example This sample code demonstrates the GetPropertyIndex call on the PCDPropertyList object. The form accepts the property name as the input value, and it returns the zero-based index of that property. Private Sub cbGetIndex_Click() Dim Dim Dim Dim nResult As Long nIndex As Long nSize As Long sPropName As String sPropName = txtPropertyName.Text If sPropName = "None" Then MsgBox "Please enter a property before " _ & "trying to retrieve the index." Else nSize = oIndexFormProps.
GetPropertyIndex nIndex = _ oIndexFormProps.GetPropertyIndex( _ sPropName ) If nIndex >= 0 And nIndex < nSize Then txtPropertyIndex.Text = nIndex Else MsgBox "This is not a valid property " _ & "or the property returned is " _ & "out of range." End If Else MsgBox "The PropertyList is empty." End If End If End Sub Related Items See the PCDPropertyList object.
GetPropertyValue GetPropertyValue Use this method to get the value of the named property from the current row in the results set. Syntax PCDGetDoc.GetPropertyValue( strPropName ) PCDGetForm.GetPropertyValue( strPropName ) PCDGetStream.GetPropertyValue( strPropName ) PCDPropertyList.GetPropertyValue( strPropName ) PCDPropertyLists.GetPropertyValue( strPropName ) PCDPutDoc.GetPropertyValue( strPropName ) PCDPutStream.GetPropertyValue( strPropName ) PCDRecentDoc.GetPropertyValue( strPropName ) PCDSearch.
GetPropertyValue PCDGetDoc PCDGetForm PCDGetStream PCDPropertyList PCDPropertyLists PCDPutDoc PCDPutStream PCDRecentDoc PCDSearch See the following methods: NextRow SetRow See the following properties: ErrDescription ErrNumber 210 CHAPTER 4
GetPropertyValueByIndex GetPropertyValueByIndex Use this method to get the value of a return property based on its location in the return properties index. Syntax PCDLookup.GetPropertyValueByIndex( intPropNdx ) PCDRecentDoc.GetPropertyValueByIndex( intPropNdx ) PCDSearch.GetPropertyValueByIndex( intPropNdx ) Parameter intPropNdx The zero-based index of the return property whose value is desired.
GetPropertyValueByIndex ErrDescription ErrNumber 212 CHAPTER 4
GetReturnProperties GetReturnProperties Use this method to get a copy of the list of properties that the server will return when the search is executed. Syntax PCDDocObject.GetReturnProperties() PCDGetDoc.GetReturnProperties() PCDPutDoc.GetReturnProperties() PCDRecentDoc.GetReturnProperties() Returns Returns a pointer to a PCDPropertyList object. Usage The GetReturnProperties method is used to retrieve data in the result set array that is returned by the Fetch method.
GetReturnProperties NextProperty SetProperty SetReturnProperties See the following properties: ErrDescription ErrNumber 214 CHAPTER 4
GetReturnProperty GetReturnProperty Use this method to get the value of a return property. Syntax PCDDocObject.GetReturnProperty( strPropName ) Parameter strPropName A string (BSTR) that contains the name of the property that the GetReturnProperty method is to return. Returns Returns a pointer to a VARIANT structure where the value of the property is put. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. This value is also available in the ErrNumber property.
GetRowCount GetRowCount Use the GetRowCount method to determine the number of rows that a result data set returns. Syntax PCDNetworkInfo.GetRowCount() PCDSQL.GetRowCount() Returns The GetRowCount method returns a long integer that contains the number of rows in the current result set. Example The Example in the discussion of the PCDNetworkInfo object illustrates how you can use GetRowCount in your custom applications.
GetRowsAffected GetRowsAffected This method reports the number of rows in the SQL database that were affected by the latest DELETE, INSERT, or UPDATE structured query language statement executed against the DM library. Syntax PCDSQL.GetRowsAffected() Returns The GetRowsAffected method returns a long integer that contains the number of rows affected by the most recent SQL statement that resulted in a DELETE, INSERT, or UPDATE operation.
GetRowsFound GetRowsFound Use this method to get the number of rows found as a result of a search operation. Syntax PCDGetDoc.GetRowsFound() PCDLookup.GetRowsFound() PCDPutDoc.GetRowsFound() PCDRecentDoc.GetRowsFound() PCDSearch.GetRowsFound() Returns Returns a long integer that contains the number of rows in the result set.
GetRowsFound PCDSearch See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 219
GetSearchCriteria GetSearchCriteria Use this method to get a PCDPropertyList object pointer to a copy of the list of search criteria that the search object is currently using. Syntax PCDGetDoc.GetSearchCriteria() PCDLookup.GetSearchCriteria() PCDPutDoc.GetSearchCriteria() PCDRecentDoc.GetSearchCriteria() Returns Returns a PCDPropertyList object pointer. Related Items See the following objects: PCDGetDoc PCDLookup PCDPutDoc PCDRecentDoc See the SetSearchCriteria method.
GetSize GetSize Use this method to get the number items in a list. For example, you can use GetSize to request the number of available libraries on the DM Server or the number of properties in a list of properties. Syntax PCDGetLoginLibs.GetSize() PCDNetAliasList.GetSize() PCDPropertyList.GetSize() PCDTrusteeList.GetSize() Returns Returns a long integer to receive the number of items in the return data set list.
GetSize See the following properties: ErrDescription ErrNumber 222 CHAPTER 4
GetSQLErrorCode GetSQLErrorCode This method retrieves the native SQL error code as returned by the library’s database. Syntax PCDSQL.GetSQLErrorCode() Returns This method returns a long integer that contains the error code number associated with the most recent SQL error. If zero is returned, no error occurred. Usage The GetSQLErrorCode method differs from the ErrNumber method. If, for example, the Execute method returns an error, the ErrNumber property should be used to identify the error number.
GetSQLErrorCode Code Description of SQL Error Code 7 Server Not Available 8 Invalid Sybase Database 9 No Rows 10 Invalid Column Number 11 Invalid Row Number 12 Invalid Table Name 13 Invalid Column Name 14 Invalid Index Name 15 Duplicate Key in Index 16 Constraint Violation 17 Object Already Exists 18 Already Indexed 19 Not DBA 20 Stored Procedure Failed 21 No Memory 22 Cancelled 23 Permission Denied 24 Deadlocked Example The Example in PCDSQL illustrates the use of the
GetTrustee GetTrustee Use this method to get the trustee rights value for the trustee you specify. Syntax PCDDocObject.GetTrustee( strTrusteeName, _ intTrusteeFlag ) Parameters strTrusteeName String (BSTR) that identifies the name of the trustee. intTrusteeFlag A long integer that identifies the flag setting for the trustee.
GetTrustee See the following properties: ErrDescription ErrNumber 226 CHAPTER 4
GetTrusteeIndex GetTrusteeIndex Use this method to locate the index location of a trustee in a list of trustees. Syntax PCDTrusteeList.GetTrusteeIndex( strTrusteeName, _ intTrusteeFlags ) Parameters strTrusteeName String (BSTR) that identifies the name of the trustee. intTrusteeFlags A long integer that identifies the flag setting for the trustee.
GetTrusteeIndex ErrDescription ErrNumber 228 CHAPTER 4
GetTrusteeRights GetTrusteeRights Use this method to get the trustee rights for an entry in a trustee list at an index offset that you specify. Syntax PCDTrusteeList.GetTrusteeRights( intNdx ) Parameter intNdx An unsigned long integer that identifies the offset of the trustee entry you specify in a list of trustees. Returns Returns a an integer that contains the trustee rights. Languages such as JavaScript and Visual Basic return this as a function value. Related Items See the PCDTrusteeList object.
GetTrustees GetTrustees Once a list of trustees has been retrieved from the SQL database by use of FetchTrustees, use this method to populate a PCDTrusteeList object so that you can iterate through the trustee entries. Syntax PCDDocObject.GetTrustees() Returns Returns a variant to the trustee list. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
GetUserFullName GetUserFullName This method retrieves the full name of the user from the network operating system. Syntax PCDNetworkInfo.GetUserFullName( strNetworkType, _ strDomainName, _ strMemberID ) Parameters strNetworkType A string that identifies the type of network operating system that is currently running.
GetUserFullName Related Items See the PCDNetworkInfo object. See the GetValue method.
GetUserGroups GetUserGroups This method allows you to load a result set with the security groups that include the network user ID that you specify. Syntax PCDNetworkInfo.GetUserGroups( strNetworkType, _ strDomainName, _ strUserID ) Parameters strNetworkType A string that identifies the type of network operating system that is currently running.
GetUserGroups Example The Example in the discussion of the PCDNetworkInfo object shows how you can use this method. Related Items See the PCDNetworkInfo object.
GetUserList GetUserList This method retrieves the set of user ID values that exist within the network domain that you specify. Syntax PCDNetworkInfo.GetUserList( strNetworkType, _ strDomainName ) Parameters strNetworkType strDomainName A string that identifies the type of network operating system that is currently running.
GetUserList Example The Example in the discussion of the PCDNetworkInfo object shows how you can use this method. Related Items See the PCDNetworkInfo object.
GetValue GetValue The GetValue method retrieves the next value from the current result set. Syntax PCDNetworkInfo.GetValue() Returns GetValue returns a string that contains the value of the current element of the result set. It always returns a string, regardless of the actual data type. Usage The NextRow method must be called before GetValue is called. Example The Example in the discussion of the PCDNetworkInfo object shows how you can use this method. Related Items See the PCDNetworkInfo object.
GrantRight GrantRight Use this method to set the named bit in the rights mask for the specified user or group. Syntax PCDDocObject.GrantRight( strRightName, _ intRightsIn ) Parameters strRightName The name of the right to grant. intRightsIn The rights mask in which you want to grant the named right. Returns Returns an integer that contains the rights mask. This information is stored in the ACCESSRIGHTS column in the SECURITY table of the SQL database that supports your DM system.
GrantRight Value Token Description 64 %PR_DELETE Delete Document 128 %PR_ACCESS_CONTROL Control Access to Document 256 %RIGHT8 Assign to File 512 %RIGHT9 View Only Published The following QuickSearch rights are supported: Value Token Description 1 %QS_VIEW View Search 2 %QS_EDIT Edit Search 4 %QS_DELETE Delete Search Related Items See the PCDDocObject object.
HasRight HasRight Use this method to determine if the specified user or group rights mask permits the right you specify. Syntax PCDDocObject.HasRight( strRightName, intRightsIn ) Parameters strRightName A string value that identifies the name of the right. intRightsIn The rights mask in which you want to identify whether the right is available to the user. Returns Returns TRUE if the named right is available to the user.
HasRight Value Token Description 16 %PR_CONTENT_EDIT Edit Document Content 32 %PRCONTENT_COPY Copy Document Content 64 %PR_DELETE Delete Document 128 %PR_ACCESS_CONTROL Control Access to Document 256 %RIGHT8 Assign to File 512 %RIGHT9 View Only Published The following QuickSearch rights are supported: Value Token Description 1 %QS_VIEW Use Search 2 %QS_EDIT Edit Search 4 %QS_DELETE Delete Search Example The Example in the discussion of the FetchTrustees method shows how you
IsEmpty IsEmpty Use this method to check whether an empty document was uploaded. Syntax PCDASPFileUpload.IsEmpty() Returns IsEmpty returns a Boolean value. TRUE indicates that an empty document was uploaded. Usage In Netscape and Internet Explorer, users can erroneously attempt to upload a non-existent file by entering a file name that does not exist on their system. The IsEmpty method provides you with a way to test for this before the system tries to create the document in a DM file store.
IsMemberOf IsMemberOf This method reports whether or not a user ID is a member of the network group that you specify. Syntax PCDNetworkInfo.IsMemberOf( strNetworkOS, _ strDomainName, _ strUserID, _ strGroupName ) Parameters strNetworkOS A string variable that identifies the network operating system that is currently running.
IsMemberOf a call to NextRow returns FALSE. No results are returned if either the Domain name or the Group name is blank. Example See the Example in the discussion of the PCDNetworkInfo object for sample code that illustrates how you can use the IsMemberOf method in your custom applications. Related Items See the PCDNetworkInfo object. See the NextRow method.
NewEnum NewEnum This method provides standard-style C++ COM Enum access to the object. Syntax PCDPropertyLists.NewEnum() Returns This method returns a pointer to a PCDEnumPropertyLists object. Related Items See the PCDEnumPropertyLists object.
Next Next This method returns PCDPropertyList items from the PCDPropertyLists object. You specify the number of items that you want returned. Syntax PCDEnumPropertyLists.Next( lngNmbr ) Parameters lngNmbr A long integer that identifies the number of PCDPropertyList items that you want returned to you. Returns The Next method returns two parameters: an array of PCDPropertyList objects and a long integer that indicates that number of PCDPropertyList objects that were returned by the call.
NextMetaRow NextMetaRow Use this method to increment the current pointer in the metadata results set. Syntax PCDLookup.NextMetaRow() PCDRecentDoc.NextMetaRow() PCDSearch.NextMetaRow() Returns Returns a Boolean value of TRUE, unless there are no more rows, in which case it returns FALSE. Usage This is useful only after calling Execute. Call this or SetMetaRow after calling Execute, but before the first call to GetMetaPropertyValue.
NextProperty NextProperty Use this method to increment the internal pointer for the current property list so it points to the next property in the list. Syntax PCDPropertyList.NextProperty() PCDPropertyLists.NextProperty() Returns Returns an HRESULT return value to indicate the status of the method. If the method increments past the end of the list, the return value will be PCD_S_END_OF_LIST. Otherwise, it returns S_OK.
NextRow NextRow This method increments the current row pointer. Syntax PCDGetDoc.NextRow() PCDLookup.NextRow() PCDNetworkInfo.NextRow() PCDPropertyLists.NextRow() PCDPutDoc.NextRow() PCDRecentDoc.NextRow() PCDSearch.NextRow() PCDSQL.NextRow() Returns Returns a Boolean value of TRUE if pointer incremented without error. It returns FALSE if the row number is less than 1 or greater than the number of rows in the result set. Usage You can make a call to NextRow or SetRow only after calling Execute.
NextRow PCDPutDoc PCDRecentDoc PCDSearch PCDSQL See the following methods: Execute GetMetaPropertyValue GetMetaRowsFound GetPropertyValue GetRowsFound GetValue SetRow See the following properties: ErrDescription ErrNumber 250 CHAPTER 4
NextTrustee NextTrustee Use this method to iterate through the trustees in the trustee list. Syntax PCDTrusteeList.NextTrustee() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Usage Checking the ErrNumber property allows you to determine whether or not the pointer was able to iterate to the next trustee. ErrNumber returns S_OK if it successfully positioned on a list entry.
OnEndPage OnEndPage The Active Server Pages (ASP) engine calls this method to clean up ASP objects. Syntax PCDASPFileUpload.OnEndPage() Caution: While the OnEndPage method is visible to you in the DM API, you should never call it in your custom applications. Only the ASP engine should call this method. Related Items See the PCDASPFileUpload object. See the OnStartPage method.
OnStartPage OnStartPage The Active Server Pages (ASP) engine calls this method to initialize pointers to ASP objects that the Execute method uses. Syntax PCDASPFileUpload.OnStartPage( intUnk ) Caution: While the OnStartPage method is visible to you in the DM API, you should never call it in your custom applications. Only the ASP engine should call this method. Parameter intUnk An integer pointer that is passed in from ASP. Related Items See the PCDASPFileUpload object. See the OnEndPage method.
Read Read Use this method to read binary data from a physical file. Syntax PCDGetStream.Read( lngBytes, [ lngBytesRead ] ) Parameters lngBytes An unsigned long integer that contains the number of bytes to attempt to read. lngBytesRead An unsigned long set to the number of bytes read during the call. This parameter is optional. Returns Returns a VARIANT containing a SAFEARRAY of bytes that is the actual data read. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
ReleaseResults ReleaseResults Use this method to release the results that are currently held in memory as a result of the most recently generated SQL results set. Memory and system resources used to store the SQL result set are freed for later use. Syntax PCDLookup.ReleaseResults() PCDRecentDoc.ReleaseResults() PCDSearch.ReleaseResults() PCDSQL.ReleaseResults() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success.
Reset Reset This method resets the PCDEnumPropertyLists object’s pointer to the first entry in the list of PCDPropertyList objects in the PCDPropertyLists collection. Syntax PCDEnumPropertyLists.Reset Returns This method returns an HRESULT that indicates whether the method successfully reset the enumeration list pointer. S_OK indicates success.
RevokeRight RevokeRight Use this method to turn off a named bit in the supplied rights mask. Syntax PCDDocObject.RevokeRight( strRightName, _ intRightsIn ) Parameters strRightName The name of the right to turn off. intRightsIn The rights mask in which you want to turn off the named right. Usage The Profile and QuickSearch rights are the lower 16 bits of a 32-bit integer. Bit settings are OR’ed together.
RevokeRight The following QuickSearch rights are supported: Value Token Description 1 %QS_VIEW View Search 2 %QS_EDIT Edit Search 4 %QS_DELETE Delete Search Returns Returns an integer that contains the rights mask as it exists after the specified access right has been revoked. This information is stored in the ACCESSRIGHTS column in the SECURITY table of the SQL database that supports your DM system. Related Items See the PCDDocObject object.
Seek Seek Use this method to position the file’s current position pointer to a specific byte offset within the physical file. Syntax PCDGetStream.Seek( lngSeekOffset ) Parameter lngSeekOffset An unsigned long integer that specifies the offset from the beginning of the file object where you want the pointer to be positioned. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
SetChunkFactor SetChunkFactor This method sets the number of rows to retrieve from the server results set when a SQL call is made. The default is 10. Syntax PCDLookup.SetChunkFactor( lngChunkSize ) PCDPropertyLists.SetChunkFactor( lngChunkSize ) PCDRecentDoc.SetChunkFactor( lngChunkSize ) PCDSearch.SetChunkFactor( lngChunkSize ) Parameter lngChunkSize A long integer that specifies the number of rows to retrieve into the local cache at one time.
SetChunkFactor ErrDescription ErrNumber DM API METHODS AND PROPERTIES 261
SetComplete SetComplete For languages such as JavaScript and VBScript that do not give the user explicit control over when an interface is released, use this call to release all locks and other resources used by the stream. The stream is no longer available for use after this call. Note: If you have control over the release of interfaces, you should release the interface rather than issuing this call to release the interface. Syntax PCDGetStream.SetComplete() PCDPutStream.
SetDST SetDST Use this method to set the document security token (DST) that will be used in processing the search request or manipulating document objects. Syntax PCDDocObject.SetDST( strDST ) PCDGetDoc.SetDST( strDST ) PCDGetForm.SetDST( strDST ) PCDLogin.SetDST( strDST ) PCDLookup.SetDST( strDST ) PCDNetworkInfo.SetDST( strDST ) PCDPropertyLists.SetDST( strDST ) PCDPutDoc.SetDST( strDST ) PCDRecentDoc.SetDST( strDST ) PCDSearch.SetDST( strDST ) PCDSQL.
SetDST been granted to you. The DST can be used across multiple DM libraries. Example The SetDST method is used in many examples throughout this guide. The Fetching a DM Document Object discussion in Chapter 1 provides a representative reference that shows how you can use this method. Related Items See the following objects: PCDDocObject PCDGetDoc PCDGetForm PCDLogin PCDLookup PCDNetworkInfo PCDPropertyLists PCDPutDoc PCDRecentDoc PCDSearch PCDSQL See the GetDST method.
SetLibrary SetLibrary This method sets the DM library that is to be used with the current instance of the PCDSQL object. Syntax PCDSQL.SetLibrary( strMyLibrary ) Parameter strMyLibrary A string variable that contains the name of the library to use. Returns Returns an HRESULT value. It always returns a value that indicates SUCCESS, whether the library that is being set exists or not.
SetLookupId SetLookupId Use this method to set the lookup form that you want to process. Similar to searches, lookups are controlled by forms. Syntax PCDLookup.SetLookupId( strLookupName ) Parameter strLookupName The lookup form that you want to use. One common example is the PEOPLE form. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
SetLookupId ErrDescription ErrNumber DM API METHODS AND PROPERTIES 267
SetMaxRows SetMaxRows Use this method to set the maximum number of rows to be returned by your lookup or search. Syntax PCDLookup.SetMaxRows( intMaxRows ) PCDRecentDoc.SetMaxRows( intMaxRows ) PCDSearch.SetMaxRows( intMaxRows ) Parameter intMaxRows An integer variable that contains the maximum number of rows. Return Values Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
SetMaxRows ErrDescription ErrNumber DM API METHODS AND PROPERTIES 269
SetMetaRow SetMetaRow Use this method to set the pointer to the current metadata row in the results set to a specific row number. Syntax PCDLookup.SetMetaRow( lngRowNbr ) PCDRecentDOc.SetMetaRow( lngRowNbr ) PCDSearch.SetMetaRow( lngRowNbr ) Parameter lngRowNbr A long integer that indicates the row number where you want to position the result set pointer. Returns Returns a Boolean value. TRUE indicates the current row number has been set to the specified row number. FALSE indicates there was an error.
SetMetaRow See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 271
SetObjectType SetObjectType Use this method to set the object type. For PCDDocObject and PCDGetForm the object is a form available to the user. Syntax PCDDocObject.SetObjectType( strObjectType ) PCDGetForm.SetObjectType( strObjectType ) PCDPropertyLists.SetObjectType( strObjectType ) Parameter strObjectType A string (BSTR) variable that identifies the object type that the method is to use. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success.
SetObjectType PCDPropertyLists See the following methods: Create Fetch Update See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 273
SetOptions SetOptions This method allows you to set recursion and level options for items in property list collections. Syntax PCDPropertyLists.SetOptions( lngOptionVal ) Parameters lngOptionVal A long integer that contains the bit-map indicator for the option that you set.
SetOptions Related Items See the following objects: PCDPropertyList PCDPropertyLists See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 275
SetProperties SetProperties Use this method to set an object with a collection of properties. Any previously set properties are deleted. Syntax PCDDocObject.SetProperties( strPropList ) PCDPropertyList.SetProperties( strPropList ) PCDPropertyLists.SetProperties( strPropList ) Parameter strPropList A pointer to the object (often a PCDPropertyList object) from which the PCDDocObject should copy the new properties. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success.
SetProperty SetProperty Use this method to set a property to be used with a Create, Execute, or Update method. If the property already exists in the property list, its value will be updated. If it does not exist, it will be added to the property list. Syntax PCDDocObject.SetProperty( strPropName, vntVal ) PCDPropertyLists.SetProperty( strPropName, vntVal ) Parameters strPropName A string (BSTR) variable that contains the name of the property to be set.
SetProperty ErrDescription ErrNumber 278 CHAPTER 4
SetReturnProperties SetReturnProperties Use this method to set PCDRecentDoc or PCDSearch objects with a collection of properties. Any property values that were previously set are deleted by the SetReturnProperties method. Syntax PCDRecentDoc.SetReturnProperties( objPropList ) PCDSearch.SetReturnProperties( objPropList ) Parameter objPropList A variable that points to a PCDPropertyList object that contains the return properties of the search. Returns Returns an HRESULT to receive the result of the call.
SetRow SetRow Use this method to set the row pointer in the results set to a specific row. Syntax PCDGetDoc.SetRow( lngRowNbr ) PCDLookup.SetRow( lngRowNbr ) PCDPutDoc.SetRow( lngRowNbr ) PCDRecentDoc.SetRow( lngRowNbr ) PCDSearch.SetRow( lngRowNbr ) PCDSQL.SetRow( lngRowNbr ) Parameter lngRowNbr A long integer that identifies the row number to which the row pointer is to be set. Returns Returns a Boolean value that indicates whether or not the operation completed successfully.
SetRow PCDGetDoc PCDLookup PCDPutDoc PCDRecentDoc PCDSearch See the following methods: GetColumnValue GetPropertyValue NextRow See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 281
SetSearchCriteria SetSearchCriteria Use this method to set the search criteria to be used in the current search. Syntax PCDGetDoc.SetSearchCriteria( objPropList ) PCDLookup.SetSearchCriteria( objPropList ) PCDPutDoc.SetSearchCriteria( objPropList ) PCDRecentDoc.SetSearchCriteria( objPropList ) PCDSearch.SetSearchCriteria( objPropList ) Parameter objPropList An object variable that points to a PCDPropertyList object. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success.
SetSearchCriteria PCDSearch See the following methods: AddSearchCriteria GetSearchCriteria See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 283
SetSearchObject SetSearchObject Use this method to identify the form that you want to use to process the specified operation. Syntax PCDGetDoc.SetSearchObject( strObjName ) PCDLookup.SetSearchObject( strObjName ) PCDPutDoc.SetSearchObject( strObjName ) PCDRecentDoc.SetSearchObject( strObjName ) PCDSearch.SetSearchObject( strObjName ) Parameter strObjName A string variable that identifies the form to be used in the operation. Returns Returns an HRESULT to receive the result of the call.
SetSearchObject PCDRecentDoc PCDSearch See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 285
SetTargetProperty SetTargetProperty Use this method to set the target property of a lookup. Syntax PCDLookup.SetTargetProperty( strTargetProp ) Parameter strTargetProp A string variable that identifies the target property that is to be used for the lookup. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
SetTargetProperty ErrDescription ErrNumber DM API METHODS AND PROPERTIES 287
SetTrustee SetTrustee Use this method to set a trustee value in a trustee list. If the trustee name and flags match an existing entry in the list, its rights will be updated. If it does not match an existing entry, the entry will be added. Syntax PCDDocObject.SetTrustee( strTrusteeName, _ intTrusteeFlags, _ intTrusteeRights ) Parameters strTrusteeName A string (BSTR) variable that identifies the name of the trustee. intTrusteeFlags An integer variable that sets the trustee flags.
SetTrustee SetTrustees See the following properties: ErrDescription ErrNumber DM API METHODS AND PROPERTIES 289
SetTrustees SetTrustees Use this method to copy all the trustee entries from a PCDTrusteeList object into the internal trustee list for the PCDDocObject. Syntax PCDDocObject.SetTrustees( objTrusteeList ) Parameter objTrusteeList A pointer to a PCDTrusteeList object from which the PCDDocObject can copy the trustee list. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
SetTrustees ErrDescription ErrNumber DM API METHODS AND PROPERTIES 291
SetTrusteeRights SetTrusteeRights Use this method to update the Trustee rights for a trustee at a given offset in the trustee list. Syntax PCDTrusteeList.SetTrusteeRights( lngNdx, _ intTrusteeRights ) Parameters lngNdx An unsigned long integer that contains the offset in the trustee list where trustee rights are to be set. intTrusteeRights An integer that contains the trustee rights flags. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success.
Skip Skip This method skips PCDPropertyList objects in the PCDPropertyLists collection. You specify how many objects are to be skipped. Syntax PCDEnumPropertyLists.Skip( lngNmbr ) Parameters lngNmbr A long integer that identifies the number of objects that the enumeration list pointer is to skip. Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
UnitName UnitName Use this method to get unit name of an entry in a PCDLogin list that a PCDNetAliasList object is accessing. Syntax PCDNetAliasList.UnitName( lngNdx ) Parameter lngNdx A long integer that identifies the entry in the list. Returns Returns a string that identifies the unit name. Usage The index list processed by this method is zero-based. Example The discussion on Providing Library Access in chapter 1 shows how you can use this method in custom applications you create.
UnitType UnitType Use this method to get unit type of an entry in a PCDLogin list that a PCDNetAliasList object is accessing. Syntax PCDNetAliasList.UnitType( lngNdx ) Parameter lngNdx A long integer that identifies the entry in the list. Returns Returns an integer value that identifies the unit type. The type values are as follows: Value Unit Type 0 LIBRARY_LOGIN 1 NETWORK_BINDERY 2 NETWORK_NDS 8 MS_NETWORK Usage The index list processed by this method is zero-based.
UnitType UnitName UserName See the following properties: ErrDescription ErrNumber 296 CHAPTER 4
Update Update This method updates a PCDDocObject using the information that has previously been set by other methods. Syntax PCDDocObject.Update() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The discussion about Getting and Updating Trustee Information in chapter 1 shows how you can use the Update method. Related Items See the PCDDocObject object.
UpdateTrustees UpdateTrustees Use this method to update trustee information for a PCDDocObject object. Syntax PCDDocObject.UpdateTrustees() Returns Returns an HRESULT to receive the result of the call. S_OK indicates success. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value. Example The UpdateTrustees method is discussed in the section titled Getting and Updating Trustee Information in chapter 1. Related Items See the PCDDocObject object.
UserName UserName Use this method to get user name of an entry in a PCDLogin list that a PCDNetAliasList object is accessing. Syntax PCDNetAliasList.UserName( lngNdx ) Parameter lngNdx A long integer that identifies the entry in the list. Returns Returns a string value that contains a user name. Usage The index list processed by this method is zero-based. Example The discussion on Providing Library Access in chapter 1 shows how you can use this method in custom applications you create.
Write Write Use this method to write binary data to a physical file. Syntax PCDPutStream.Write( vntData, lngBytes ) Parameters vntData A variant variable that contains the data to write out to the file. It should be a BSTR or a SAFEARRAY. lngBytes The total number of bytes of data that are written to the vntData variable. Returns Returns the actual number of bytes written during the Write operation. Languages such as JavaScript, Visual Basic, and VBScript return this as a function value.
C h a p t e r 5 DM API Tokens In This Chapter This chapter presents an alphabetical list of DM tokens. Each entry discusses the syntax, usage, and other information associated with each token.
%ADD_ATTACHMENT %ADD_ATTACHMENT This token is used with the %VERSION_DIRECTIVE token to add an attachment. See %VERSION_DIRECTIVE for further information. Syntax PCDDocObject.SetProperty(“%VERSION_DIRECTIVE”, _ “%ADD_ATTACHMENT”) Parameters %VERSION_DIRECTIVE The token that indicates that this command statement adjusts the document version settings. %ADD_ATTACHMENT The token identifier that indicates that an attachment is being added to the current document version.
%ATTACHMENT_ID %ATTACHMENT_ID This token is used by the Update method that PCDDocObject supports to add an attachment to the document. Syntax PCDDocObject.SetProperty(“%ATTACHMENT_ID”, _ lngAttachDocNum) Parameters %ATTACHMENT_ID The token identifier that indicates an attachment is being added to the current document. lngAttachDocNum The value from the DOCNUMBER column of the PROFILE table that identifies the document that is being added as an attachment.
%CHECKIN_DATE This token is used in the Update method that the PCDDocObject objec t supports when the object is being checked out or locked. Syntax PCDDocObject.SetProperty( _ “%CHECKIN_DATE”, dteDueDate) Parameters %CHECKIN_DATE The token identifier that indicates checkin data is being set. dteDueDate A date variable that contains the checkin date value. Example pDocObject = CreateObject("PCDClient.PCDDocObject.1") 'Set the expected check-in date.
%CHECKOUT_COMMENT %CHECKOUT_COMMENT This token is used in the Update method that the PCDDocObject object supports to specify the checkout comment when an object is being checked out or locked. Syntax PCDDocObject.SetProperty( _ “%CHECKOUT_COMMENT”, strComment) Parameters %CHECKOUT_COMMENT The token identifier that indicates a check-out comment is being set. strComment A string variable that contains the checkout comment. Example pDocObject = CreateObject("PCDClient.PCDDocObject.
%CONTENT %CONTENT This token is used to retrieve a stream for the content of the document. It can also be used to update the document. Syntax PCDGetDoc.GetPropertyValue(“%CONTENT”) PCDPutDoc.GetPropertyValue(“%CONTENT”) Parameters %CONTENT Used with the PCDGetDoc object, the %CONTENT token retrieves a pointer to a PCDGetStream object that allows the program to get the content of the document.
%CONTENT 'Report the total components (or rows). iCount = pGetDoc.GetReturnValue(%NUM_COMPONENTS) MsgBox(“The totoal number of rows = “ & CStr(iCount)) 'Get the first row. pGetDoc.SetRow(1) 'Get the stream. pGetStream = pGetDoc.GetPropertyValue("%CONTENT") checkError(pGetDoc, "ERROR_GETCONTENT") 'Get the size of the content stream. VerFileSize = GetStream.GetPropertyValue( _ "%ISTREAM_STATSTG_CBSIZE_LOWPART") Related Items See the following objects: PCDGetDoc PCDPutDoc See the GetPropertyValue method.
%CONTENTS_AFTER_ITEM %CONTENTS_AFTER_ITEM This token is used in conjunction with %CONTENTS_DIRECTIVE to specify that a folder should be moved after another folder. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_AFTER_ITEM”, lngAfterItem) Parameters %CONTENTS_AFTER_ITEM The token identifier that indicates that the current item is to be positioned after another item. lngAfterItem The value from the DOCNUMBER column of the PROFILE table that identifies the item after which the new link is to be inserted.
%CONTENTS_AFTER_ITEM CONTENTS_MOVE_AFTER") 'Update the document. pDocObject.Update() 'Check for errors. checkError(pDocObject, "ERROR_MOVEAFTERFOLDERITEM") 'Destroy the object. delete pDocObject Related Items See the PCDPDocObject object. See the SetProperty method. See the %CONTENTS_DIRECTIVE token.
%CONTENTS_COPY_CONTENTS %CONTENTS_COPY_CONTENTS This token is used in conjunction with %CONTENTS_DIRECTIVE to specify that a folder’s content should be copied into another folder. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DIRECTIVE”, _ “%CONTENTS_COPY_CONTENTS”) Parameters %CONTENTS_DIRECTIVE The token identifier that indicates that the program will manipulate the contents of a folder.
%CONTENTS_COPY_CONTENTS 'Set the target folder. pDocObject.SetProperty("%CONTENTS_DST_PARENT", tarFolderNum) 'Set the target folder version. pDocObject.SetProperty("%CONTENTS_DST_PARENT_VERSION", _ tarFolderVersion) 'Set the target folder library. pDocObject.SetProperty("%CONTENTS_DST_PARENT_LIBRARY", _ tarFolderLibID) 'Command to copy. pDocObject.SetProperty("%CONTENTS_DIRECTIVE", _ "%CONTENTS_COPY_CONTENTS") 'Perform the update. pDocObject.Update() 'Check the error.
%CONTENTS_DIRECTIVE %CONTENTS_DIRECTIVE This token is used to manipulate the content of the folder. The following operations are supported: • %CONTENTS_MOVE_DOWN • %CONTENTS_MOVE_UP • %CONTENTS_MOVE_TO_TOP • %CONTENTS_MOVE_AFTER • %CONTENTS_REORDER_CONTENTS • %CONTENTS_WHERE_USED • %CONTENTS_COPY_CONTENTS Syntax PCDDocObject.
%CONTENTS_DIRECTIVE See the following tokens: %CONTENTS_COPY_CONTENTS %CONTENTS_MOVE_AFTER %CONTENTS_MOVE_DOWN %CONTENTS_MOVE_TO_TOP %CONTENTS_MOVE_UP %CONTENTS_REORDER_CONTENTS %CONTENTS_WHERE_USED DM API TOKENS 313
%CONTENTS_ITEM %CONTENTS_ITEM This token identifies the system ID that identifies the object that is the primary subject of the current operation. Syntax PCDDocObject.SetProperty(“%CONTENTS_ITEM”, _ lngSystemID) Parameters %CONTENTS_ITEM The token identifier that indicates that this statement references the unique identifier for the profiled object involved in the current operation. lngSystemID The SYSTEM_ID value from the FOLDER_ITEM database table.
%CONTENTS_ITEM %CONTENTS_MOVE_DOWN %CONTENTS_MOVE_TO_TOP %CONTENTS_MOVE_UP DM API TOKENS 315
%CONTENTS_MOVE_AFTER %CONTENTS_MOVE_AFTER This token is used in conjunction with %CONTENTS_DIRECTIVE to specify that a folder should be repositioned so it follows another folder in the collection. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DIRECTIVE”, _ “%CONTENTS_MOVE_AFTER”) Parameters %CONTENTS_DIRECTIVE The token identifier that indicates that the program will manipulate the contents of a folder.
%CONTENTS_MOVE_AFTER 'Specify the place. pDocObject.SetProperty("%CONTENTS_AFTER_ITEM", afterSystemID) 'Set the command. pDocObject.SetProperty("%CONTENTS_DIRECTIVE", _ %CONTENTS_MOVE_AFTER") 'Perform the update. pDocObject.Update() 'Check for errors. checkError(pDocObject, "ERROR_MOVEAFTERFOLDERITEM") 'Delete the object. delete pDocObject Related Items See the PCDDocObject object. See the SetProperty method. See the %CONTENTS_DIRECTIVE token.
%CONTENTS_MOVE_DOWN %CONTENTS_MOVE_DOWN Use this token in conjunction with %CONTENTS_DIRECTIVE to move a folder down by one position. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DIRECTIVE”, _ “%CONTENTS_MOVE_DOWN”) Parameters %CONTENTS_DIRECTIVE The token identifier that indicates that the program will manipulate the contents of a folder. %CONTENTS_MOVE_ DOWN The token identifier that the target folder is to be displayed one position further down in the folder collection.
%CONTENTS_MOVE_DOWN "%CONTENTS_MOVE_DOWN") 'Process the update. pDocObject.Update() 'Check for error(s). checkError(pDocObject, "ERROR_MOVEDOWNFOLDERITEM") 'Clean-up. delete pDocObject Related Items See the PCDDocObject object. See the SetProperty method. See the %CONTENTS_DIRECTIVE token.
%CONTENTS_MOVE_TO_TOP %CONTENTS_MOVE_TO_TOP Use this token in conjunction with %CONTENTS_DIRECTIVE to move a folder to the top of the collection. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DIRECTIVE”, _ “%CONTENTS_MOVE_TO_TOP”) Parameters %CONTENTS_DIRECTIVE The token identifier that indicates that the program will manipulate the contents of a folder. %CONTENTS_MOVE_TO_ TOP This token indicates that the specified folder is to be listed first in the folder collection. Example 'Get the library name.
%CONTENTS_MOVE_TO_TOP pDocObject.SetProperty("%CONTENTS_DIRECTIVE", _ "%CONTENTS_MOVE_TO_TOP”) 'Perform the update. pDocObject.Update() 'Check for errors. checkError(pDocObject, "ERROR_MOVEDOWNFOLDERITEM") 'Clean up. delete pDocObject Related Items See the PCDDocObject object. See the SetProperty method. See the %CONTENTS_DIRECTIVE token.
%CONTENTS_MOVE_UP %CONTENTS_MOVE_UP Use this token in conjunction with %CONTENTS_DIRECTIVE to move a folder up by one position. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DIRECTIVE”, _ “%CONTENTS_MOVE_UP”) Parameters %CONTENTS_DIRECTIVE The token identifier that indicates that the program will manipulate the contents of a folder. %CONTENTS_MOVE_UP The token identifier that the target folder is to be displayed one position earlier in the folder collection. Example 'Get the library name.
%CONTENTS_MOVE_UP pDocObject.SetProperty("%CONTENTS_DIRECTIVE", "%CONTENTS_MOVE_UP”) 'Perform the update pDocObject.Update() 'Check for errors. checkError(pDocObject, "ERROR_MOVEDOWNFOLDERITEM") 'Clean up. delete pDocObject Related Items See the PCDDocObject object. See the SetProperty method. See the %CONTENTS_DIRECTIVE token.
%CONTENTS_REORDER_CONTENTS %CONTENTS_REORDER_CONTENTS Use this token in conjunction with %CONTENTS_DIRECTIVE to change the order of the folder collection. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DIRECTIVE”, _ “%CONTENTS_REORDER_CONTENTS”) Parameters %CONTENTS_DIRECTIVE The token identifier that indicates that the program will manipulate the contents of a folder.
%CONTENTS_REORDER_CONTENTS 'Set the new order. pDocObject.SetProperty("%CONTENTS_REORDER_ARRAY", pOrder) 'Set the action. pDocObject.SetProperty("%CONTENTS_DIRECTIVE", _ %CONTENTS_REORDER_CONTENTS") 'Perform the update. pDocObject.Update() 'Check for error(s). checkError(pDocObject, "ERROR_REORDERFOLDERITEMS") 'Clean up. delete pDocObject Related Items See the PCDDocObject object. See the SetProperty method. See the %CONTENTS_DIRECTIVE token.
%CONTENTS_SRC_PARENT %CONTENTS_SRC_PARENT This token is used in conjunction with the %CONTENTS_DIRECTIVE token and the %CONTENTS_COPY_CONTENTS token. It identifies the document number of the folder whose contents are to be copied to another folder. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_SRC_PARENT”, _ lngDocNum) Parameters %CONTENTS_SRC_ PARENT The token identifier that indicates that the document number value in this statement references the source folder item.
%CONTENTS_SRC_PARENT_LIBRARY %CONTENTS_SRC_PARENT_LIBRARY This token is used in conjunction with the %CONTENTS_DIRECTIVE token and the %CONTENTS_COPY_CONTENTS token. It identifies the library of the source folder whose contents are being copied to another folder. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_SRC_PARENT_LIBRARY”, _ intLibID) Parameters %CONTENTS_SRC_ PARENT_LIBRARY The token identifier that indicates that this statement references the library ID number of the folder item.
%CONTENTS_SRC_PARENT_VERSION %CONTENTS_SRC_PARENT_VERSION This token is used in conjunction with the %CONTENTS_DIRECTIVE token and the %CONTENTS_COPY_CONTENTS token. It identifies the document version of the source whose contents are to be copied to another folder. Syntax PCDDocObject.SetProperty( “%CONTENTS_SRC_PARENT_VERSION”, intVerNum) Parameters %CONTENTS_SRC_ PARENT_VERSION The token identifier that indicates that this statement references the version number of the source document.
%CONTENTS_DST_PARENT %CONTENTS_DST_PARENT This token is used in conjunction with the %CONTENTS_DIRECTIVE token and the %CONTENTS_COPY_CONTENTS token. It identifies the document number of the folder that is the destination of the content operation. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DST_PARENT”, _ lngDocNum) Parameters %CONTENTS_DST_ PARENT The token identifier that indicates that the document number value in this statement references the destination folder item.
%CONTENTS_DST_PARENT_LIBRARY %CONTENTS_DST_PARENT_LIBRARY This token is used in conjunction with the %CONTENTS_DIRECTIVE token and the %CONTENTS_COPY_CONTENTS token. It identifies the library of the destination folder to a document object is being copied. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DST_PARENT_LIBRARY”, _ intLibID) Parameters %CONTENTS_DST_ PARENT_LIBRARY The token identifier that indicates that this statement references the library ID number of the folder item.
%CONTENTS_DST_PARENT_VERSION %CONTENTS_DST_PARENT_VERSION This token is used in conjunction with the %CONTENTS_DIRECTIVE token and the %CONTENTS_COPY_CONTENTS token. It identifies the document version to which document contents are being. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DST_PARENT_VERSION”, _ “intVerNum”) Parameters %CONTENTS_DST_ PARENT_VERSION The token identifier that indicates that this statement references the version number of the destination document.
%CONTENTS_PARENT %CONTENTS_PARENT This token is used in conjunction with the %CONTENTS_REORDER_ARRAY token to reorganize a folder collection. Syntax PCDDocObject.SetProperty(“%CONTENTS_PARENT”, _ lngDocNum) Parameters %CONTENTS_PARENT The token identifier. (Although its name implies it references a “parent,” it references the document number of the affected folder.) lngDocNum The document number retrieved through the link in the DOCNUMBER column of the FOLDER_ITEM table.
%CONTENTS_PARENT_VERSION %CONTENTS_PARENT_VERSION This token is used in conjunction with the %CONTENTS_REORDER_ARRAY token to reorganize a folder collection. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_PARENT_VERSION”, _ lngFolderVersion) Parameters %CONTENTS_PARENT_ VERSION The token identifier, indicating that version information is being provided. lngFolderVersion The document number retrieved through the link in the VERSION_ID column of the VERSIONS table.
%CONTENTS_WHERE_USED %CONTENTS_WHERE_USED Use this token in conjunction with %CONTENTS_DIRECTIVE to get the information about where the folder is being used. Syntax PCDDocObject.SetProperty( _ “%CONTENTS_DIRECTIVE”, _ “CONTENTS_WHERE_USED”) Parameters %CONTENTS_DIRECTIVE The token identifier that indicates that the program will manipulate the contents of a folder.
%CONTENTS_WHERE_USED 'Set the chunk size. PropLists.SetChunkFactor(size) 'Execute the search. PropLists.Execute() checkError(PropLists, "ERROR_WHEREUSED") While (PropLists.NextRow()) 'Process data returned by the search. Wend Related Items See the PCDDocObject object. See the SetProperty method. See the %CONTENTS_DIRECTIVE token.
%COPYDOC %COPYDOC This token is used when a document is created by copying content from another document. Syntax PCDDocObject.SetProperty(“%COPYDOC”, _ lngDocNum) Parameters %COPYDOC The token identifier that indicates document content is being copied into a new document. lngDocNum The DOCNUMBER value from the PROFILE table that uniquely identifies the document that is being copied to create the new document. Example pDocObject.
%COPYDOC_LIBRARY %COPYDOC_LIBRARY The %COPYDOC_LIBRARY token is used when document content from one library is copied to create a new document in another library. This token identifies the library where the original document is located. Syntax PCDDocObject.SetProperty(“%COPYDOC_LIBRARY”, _ lngLibraryID) Parameters %COPYDOC_LIBRARY The token identifier that specifies that this statement contains the library where the original document that is to be copied is located.
%COPYDOC_VERSION %COPYDOC_VERSION When document content is being copied to create a new document, this token identifies the version of the document that is to be copied. Syntax PCDDocObject.SetProperty(“%COPYDOC_VERSION”, _ “lngVerNum”) Parameters %COPYDOC_VERSION The token identifier that specifies that this statement contains the version of the original document that is to be copied. lngVerNum The VERSION value from the VERSIONS table that identifies which version of the document is to be copied.
%DATA %DATA The Execute method that PCDLookup supports returns both data and metadata. The %DATA token is used to retrieve the data returned by the lookup operation. Syntax PCDLookup.GetMetaPropertyValue(“%DATA”) Parameters %DATA The token identifier used to request the data from a lookup retrieval. Example 'Create the object. pClient = CreateObject("PCDClient.PCDLookup") 'Set the DM security token. pClient.SetDST(strDST) 'Set the form. pClient.SetSearchObject("cyd_defprof") 'Set the lookup ID. pClient.
%DATA Related Items See the PCDLookup object. See the GetMetaPropertyValue method.
%DELETE_ALL %DELETE_ALL This token is used with the SetProperty method that PCDDocObject supports. Used with the %DELETE_OPTION token, it allows deletion of both the profile and the content of DM objects. Syntax PCDDocObject.SetProperty(“%DELETE_OPTION”, _ “%DELETE_ALL”) Parameters %DELETE_OPTION The token that indicates the content, or the content and the profile, is to be deleted from a DM object. %DELETE_ALL The token that both the profile and the content of the DM object are to be deleted.
%DELETE_EXPUNGE %DELETE_EXPUNGE This token is reserved for future use. At the current time, it is not supported for use by the DM API. Related Items See the PCDDocObject object.
%DELETE_OPTION %DELETE_OPTION This token is used with the SetProperty method that PCDDocObject supports. It allows deletion of either the content or both the profile and the content of DM objects. Syntax PCDDocObject.SetProperty(“%DELETE_OPTION”, _ strDeleteCmd) Parameters %DELETE_OPTION The token that indicates the content, or the content and the profile, is to be deleted from a DM object. strDeleteCmd The token that indicates the type of delete operation that is to occur.
%DELETE_OPTION See the following methods: Delete SetProperty See the following tokens: %DELETE_ALL %DELETE_EXPUNGE %DELETE_PHYSICAL_FILES 344 CHAPTER 5
%DELETE_PHYSICAL_FILES %DELETE_PHYSICAL_FILES This token is used with the SetProperty method that PCDDocObject supports. It allows deletion of the content of DM objects. It does not delete the profile of DM objects whose content is deleted. Syntax PCDDocObject.SetProperty(“%DELETE_OPTION”, _ “%DELETE_PHYSICAL_FILES”) Parameters %DELETE_OPTION The token that indicates the content, or the content and the profile, is to be deleted from a DM object.
%DOCS_LIBRARY_NAME %DOCS_LIBRARY_NAME When used with the PCDSearch object, this token retrieves the library name associated with the document specified in the search. When used with the PCDPropertyLists object, it retrieves the library name associated with the current row of the list. Syntax PCDPropertyLists.GetCurrentPropertyName( _ “%DOCS_LIBRARY_NAME”) PCDSearch.
%DOCS_LIBRARY_NAME 'Execute the search. pRelated.
%DOCUMENT_NUMBER %DOCUMENT_NUMBER This token is used to specify the document number of the profiled item that the application requires. Syntax PCDDocObject.SetProperty(“%DOCUMENT_NUMBER”, _ “strDocNum”) Parameters %DOCUMENT_NUMBER The token identifier indicating that the document number is identified in this program statement. strDocNum The value from the DOCNUMBER column of the PROFILE table. Example 'Create an object to use to send the contents of the document. pPutDoc = CreateObject( "PCDClient.
%DOCUMENT_NUMBER See the SetProperty method.
%EFFECTIVE_RIGHTS %EFFECTIVE_RIGHTS Each document can be accessed by many users, and it can be customized. Using the Access control on the profile form, an author or document administrator can grant various access permissions to other users. Syntax PCDDocObject.GetReturnProperty( _ “%EFFECTIVE_RIGHTS”) Parameters %EFFECTIVE_RIGHTS The token identifier that requests the application to provide the access rights that the current document allows for the current user.
%EFFECTIVE_RIGHTS 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the user's effective rights for this document object. Set intAccessRights = pDocObject.GetReturnProperty( _ "%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%PR_EDIT", intAccessRights)) Then 'The user cannot edit this document. End If Related Items See the PCDDocObject object.
%ELAPSED_TIME %ELAPSED_TIME This token sets the ELAPSED_TIME column of the ACTIVITYLOG table with the amount of time that the specified document was open for edit or new version activity. Syntax PCDDocObject.SetProperty(“%ELAPSED_TIME”, _ iElapsedTime) Parameters %ELAPSED_TIME The token identifier that indicates that this command line contains the elapsed time value. iElapsedTime The elapsed time (in seconds) that the specified document was open for edit or new version activity.
%ELAPSED_TIME pDocObject.SetProperty( "%STATUS", "%LOCK_FOR_CHECKOUT" ) 'Set the elapsed time. pDocObject.SetProperty( "%ELAPSED_TIME", iElapsedTime ) Related Items See the PCDDocObject object. See the SetProperty method.
%ENCAPSULATION_TYPE %ENCAPSULATION_TYPE When users indicate that they want to view documents, those documents must be transferred from the server as data streams. There are 3 stream types: • HTML streams, where documents are converted HTML streams, • Native streams, where the MIME type of the transferred documents is used to control their display, and • RIFF streams, where the DM viewer is used to display documents. The %ENCAPSULATION_TYPE token is used to convert documents into RIFF streams.
%ENCAPSULATION_TYPE 'Check whether it is for the DM Viewer. If (rendition = "riff") Then pGetDoc.AddSearchCriteria("%ENCAPSULATION_TYPE", "RIFF") End If 'Retrieve the document objects. pGetDoc.Execute Related Items See the PCDGetDoc object. See the AddSearchCriteria method.
%FILTER_DISABLED_ROWS %FILTER_DISABLED_ROWS Some tables have a DISABLED column, which allows the system to specify that a row is disabled. Use this token to exclude such rows from a search result set. Syntax PCDLookup.AddUserFilterCriteria( _ “%FILTER_DISABLED_ROWS”, “Y”) Parameters %FILTER_DISABLED_ROWS The token identifier that indicates that this command line will specify whether disabled rows are to be filtered or not. Y Yes, disabled rows are to be filtered out of the result set.
%FOLDERITEM_LIBRARY_NAME %FOLDERITEM_LIBRARY_NAME When a new item is being linked, or added to, a folder, this token identifies the name of the home library that contains this document or folder. Syntax PCDDocObject.SetProperty( _ “%FOLDERITEM_LIBRARY_NAME”, strLibName) Parameters %FOLDERITEM_LIBRARY_ NAME The token identifier that indicates the current command line identifies the library where the specified folder item resides. strLibName The name of the library.
%FOLDERITEM_LIBRARY_NAME 'Set the parent folder’s version. pDocObject.SetProperty("PARENT_VERSION", folderVersion) 'Set the document number. pDocObject.SetProperty("DOCNUMBER",docNum) 'Set the library name. pDocObject.SetProperty("%FOLDERITEM_LIBRARY_NAME", itemLib) 'Create the object. pDocObject.Create() Related Items See the PCDDocObject object. See the SetProperty method.
%FORM_APPLICATION %FORM_APPLICATION When used with the PCDPropertyList object, this token retrieves the application ID associated with the form. When used with the PCDDocObject object, this token can be used to set the application ID that is associated with a form. Syntax PCDPropertyList.GetCurrentPropertyValue( _ “%FORM_APPLICATION”) PCDDocObject.
%FORM_APPLICATION 'Retrieve the requested information. pDocObject.Fetch() Related Items See the following objects: PCDDocObject PCDPropertyList See the following methods: GetCurrentPropertyValue SetProperty See the %FORM_NAME token.
%FORM_DEFAULT_PRIMARY %FORM_DEFAULT_PRIMARY Use this token to identify the default profile form. Syntax PCDPropertyList.GetPropertyValue( _ “%FORM_DEFAULT_PRIMARY”) Parameters %FORM_DEFAULT_PRIMARY The token identifier that indicates the default profile form is to be returned. Usage Returns “Y” if the form in the current return properties data set is the default profile form. Otherwise, “N” is returned. Example 'Create a doc object and a property list object. Dim pDocObject As PCDClient.
%FORM_DEFAULT_PRIMARY 'Get all the properties. Set pFormProperties = pDocObject.GetReturnProperties() Dim Set Dim Dim Dim intNumRows As Integer intNumRows = pFormProperties.RowCount() pProperties As New pFormProperties strFormName As String intCounter As Integer, strCounter As String for (intCounter = 1 To intNumRows) Set pProperties = pFormProperties.GetCurrentPropertyValue() If (pProperties.GetPropertyValue( _ "%FORM_DEFAULT_PRIMARY") = "Y") Then Set strFormName = pProperties.
%FORM_LIST_TYPE %FORM_LIST_TYPE This token is used to perform a search of a form. Returns a list properties describing the form. Syntax PCDDocObject.SetProperty(“%FORM_LIST_TYPE”, _ strFormType) Parameters %FORM_LIST_TYPE The token that indicates the current command line identifies the type of form that the list operation is to retrieve. strFormType A string variable or quoted string that contains the form type that the list is to contain.
%FORM_LIST_TYPE 'Run the search. pDMObj.Fetch() Related Items See the PCDDocObject object. See the SetProperty method.
%FORM_NAME %FORM_NAME Use this token to set the name of a form that a search operation uses. After a search has been performed, this token can also be used to retrieve the name of the form used in the search. Syntax PCDDocObject.SetProperty(“%FORM_NAME”, _ strFormName) PCDPropertyList.GetPropertyValue(“%FORM_NAME”) Parameters %FORM_NAME The token identifier that indicates a form name is either being specified or requested. strFormName The name of the form that is to be used for the search.
%FORM_NAME checkError(pClient, "ERROR_DOCPROFILEDSP_PROFINFOEXECUTE") 'Get the returned properties. Set pProperties = pClient.GetReturnProperties() 'Get the form name. formName = pProperties.GetPropertyValue("%FORM_NAME") Related Items See the following objects: PCDDocObject PCDPropertyList See the following methods: GetPropertyValue SetProperty See the %FORM_APPLICATION token.
%FORM_PROFILE_DEFAULTS %FORM_PROFILE_DEFAULTS Use this token to retrieve the default settings for a form. Syntax PCDPropertyList.GetPropertyValue( _ “%FORM_PROFILE_DEFAULTS”) Parameters %FORM_PROFILE_ DEFAULTS The token identifier that returns the default settings for a form. Usage This token returns a two-dimension safe array of property name and property value pairs. Use the GetCurrentPropertyName and GetCurrentPropertyValue to iterate through the returned data set containing the default settings.
%FORM_PROFILE_DEFAULTS 'Instantiate a PCDPropertyList object. pPropList = pDocObj.GetReturnProperties() 'Populate a property list with the profile defaults. pProfDefaults = pPropList.GetPropertyValue( “%FORM_PROFILE_DEFAULTS”) 'Check for errors. If Not( pPropList.ErrNumber = 0) Then 'Process the error. End If 'Iterate through the default properties. pProfDefaults.BeginIter() while( pProfDefaults = 0) strPropName = pProfDefaults.GetCurrentPropertyName() strPropValue = pProfDefaults.
%FORM_TITLE %FORM_TITLE This token is used to get the form title from the search result set. It is usually used when searching for a particular form or a collection of forms. Syntax PCDPropertyList.GetPropertyValue(“%FORM_TITLE”) Parameters %FORM_TITLE The token that indicates the title of the form is to be returned by the fetch operation. Example 'Ccreate a doc object. Set pClient = CreateObject("PCDClient.PCDDocObject.1") 'Check for errors.
%FORM_TITLE Related Items See the PCDPropertyList object. See the GetPropertyValue method.
%FT_CHARACTER_SET %FT_CHARACTER_SET This token is used to specify a character set for documents rendered in HTML format. Syntax PCDGetDoc.AddSearchCriteria( _ “%FT_CHARACTER_SET”, intCharSetID) Parameters %FT_CHARACTER_ SET The token identifier that indicates this command statement contains a character set value. intCharSetID The number that identifies the character set that is to control how HTML documents are rendered.
%FT_CHARACTER_SET Related Items See the PCDGetDoc object. See the AddSearchCriteria method.
%FT_CONFIDENCE %FT_CONFIDENCE This token is used when a full text search is performed. It expresses the relevance of a document returned by the search to the search criteria. The relevance value is expressed as a value from 1 to 5, with 1 representing greater relevance and 5 representing lesser relevance. Syntax PCDSearch.AddReturnProperty(“%FT_CONFIDENCE”) Parameters %FT_CONFIDENCE The token identifier that indicates that a relevance value is to be returned as part of the search process.
%FT_CONFIDENCE %FT_MARKER_LIST %FT_SCORE %FT_TIMESTAMP %FT_VCC_LIST %FT_VCC_RULES %SCORE_GRAPHIC %SCORE_PERCENT 374 CHAPTER 5
%FT_FORMAT %FT_FORMAT This token is used when a full text search is performed. This token specifies the document format. It is required by DM Viewer so search documents can be rendered properly. Syntax PCDSearch.AddReturnProperty(“%FT_FORMAT”) Parameters %FT_FORMAT A token that specifies the document format so that the DM Viewer can render it properly. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.1") 'Document format identifier used by DM Viewer. pClient.
%FT_FORMAT %FT_SCORE %FT_TIMESTAMP %FT_VCC_LIST %FT_VCC_RULES %SCORE_GRAPHIC %SCORE_PERCENT 376 CHAPTER 5
%FT_MARKER_LIST %FT_MARKER_LIST This token is used when a full text search is performed. It allows the SearchServer™ to mark search terms in PDF files. Syntax PCDSearch.AddReturnProperty(“%FT_MARKER_LIST”) Parameters %FT_MARKER_LIST The token allows the SearchServer to mark search text in PDF files. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.1") 'This is used by the SearchServer when searching PDF files. pClient.
%FT_MARKER_LIST %FT_VCC_LIST %FT_VCC_RULES %SCORE_GRAPHIC %SCORE_PERCENT 378 CHAPTER 5
%FT_SCORE %FT_SCORE This token is used when a full text search is performed. It expresses the relevance of the search criteria to the document. The relevance score is expressed as a percentage. Syntax PCDSearch.AddReturnProperty(“%FT_SCORE”) Parameters %FT_SCORE This token returns the relevance score of the search results as a percentage value. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.1") 'Return a percentage-based relevance score. pClient.
%FT_SCORE %FT_MARKER_LIST %FT_TIMESTAMP %FT_VCC_LIST %FT_VCC_RULES %SCORE_GRAPHIC %SCORE_PERCENT 380 CHAPTER 5
%FT_SMART_DOCUMENT %FT_SMART_DOCUMENT This token is used to convert the output stream into a MIMEencapsulated, aggregate HTML (MHTML) stream. With Internet Explorer, version 4 or later, the DM Server can send in a single stream both the HTML document and all referenced images. Syntax PCDGetDoc.AddSearchCriteria( _ “FT_SMART_DOCUMENT”, “1”) Parameters %FT_SMART_DOCUMENT The token identifier that instructs the DM Server to send referenced images in the same output stream as it uses for the HTML document.
%FT_SMART_DOCUMENT Related Items See the PCDGetDoc object. See the AddSearchCriteria method.
%FT_TIMESTAMP %FT_TIMESTAMP This token is used when a full text search is performed. It returns the last time the object was modified. Syntax PCDSearch.AddReturnProperty(“%FT_TIMESTAMP”) Parameters %FT_TIMESTAMP Return timestamp information about the search object. Usage The search returns timestamp information expressed in Unix format, showing the number of seconds since January 1, 1970 at 12:00 A.M. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.
%FT_TIMESTAMP %FT_CONFIDENCE %FT_FORMAT %FT_MARKER_LIST %FT_SCORE %FT_VCC_LIST %FT_VCC_RULES %SCORE_GRAPHIC %SCORE_PERCENT 384 CHAPTER 5
%FT_VCC_LIST %FT_VCC_LIST This token is used when a full-text search is performed. It highlights the search term in any documents returned by the search operation. Syntax PCDSearch.AddReturnProperty(“%FT_VCC_LIST”) Parameters %FT_VCC_LIST Highlight the search terms in the search results. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.1") 'Highlight the search term in the results. pClient.AddReturnProperty("%FT_VCC_LIST") 'Execute the search. pClient.
%FT_VCC_LIST %FT_TIMESTAMP %FT_VCC_RULES %SCORE_GRAPHIC %SCORE_PERCENT 386 CHAPTER 5
%FT_VCC_RULES %FT_VCC_RULES This token is used when a full-text search is performed. It is used by the DM Viewer to determine how characters should be counted. Syntax PCDSearch.AddReturnProperty(“%FT_VCC_RULES”) Parameters %FT_VCC_RULES The token identifier that specifies rules the DM Viewer uses to count characters. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.1") 'Set viewer rules for counting characters. pClient.
%FT_VCC_RULES %FT_TIMESTAMP %FT_VCC_LIST %SCORE_GRAPHIC %SCORE_PERCENT 388 CHAPTER 5
%GET_ALL_RELATED %GET_ALL_RELATED Use this token to get all items that relate to the search item, whether they are located in the same library as the search item or in remote libraries. Syntax PCDSearch.AddSearchCriteria( _ “%GET_RELATED_ITEMS”, _ “%GET_ALL_RELATED”) Parameters %GET_RELATED_ITEMS This token identifier indicates that a search parameter is to be set that indicates whether local or remote libraries are to be searched.
%GET_ALL_RELATED 'Set the related token. pRelated.AddSearchCriteria("%GET_RELATED_ITEMS", _ "%GET_ALL_RELATED") Related Items See the PCDSearch object. See the AddSearchCriteria method.
%GET_LOCAL_RELATED %GET_LOCAL_RELATED Use this token to get all the documents related to the search item that are in the same library as the search object. Syntax PCDDocObject.SetProperty( _ “%GET_RELATED_ITEMS”, _ “%GET_LOCAL_RELATED”) Parameters %GET_RELATED_ITEMS This token identifier indicates that a search parameter is to be set that indicates whether local or remote libraries are to be searched.
%GET_LOCAL_RELATED pRelated.AddSearchCriteria("%GET_RELATED_ITEMS", _ "%GET_LOCAL_RELATED") Related Items See the PCDSearch object. See the AddSearchCriteria method.
%GET_RELATED_ITEMS %GET_RELATED_ITEMS This token indicates that the search should return related items. Syntax PCDSearch.AddSearchCriteria( _ “%GET_RELATED_ITEMS”, _ strTypeOfRelatedSearch) Parameters %GET_RELATED_ITEMS This token identifier indicates that a search parameter is to be set that indicates whether local or remote libraries are to be searched. strTypeOfRelatedSearch A string variable or quoted literal that resolves to one of the search types that the %GET_RELATED_ITEMS token supports.
%GET_RELATED_ITEMS See the AddSearchCriteria method.
%GET_REMOTE_RELATED %GET_REMOTE_RELATED This token indicates that the search should only return related items that are located in document libraries that are remote to the library that contains search document. Syntax PCDSearch.AddSearchCriteria( _ “%GET_RELATED_ITEMS”, _ “%GET_REMOTE_RELATED”) Parameters %GET_RELATED_ITEMS This token identifier indicates that a search parameter is to be set that indicates whether local or remote libraries are to be searched.
%GET_REMOTE_RELATED 'Set the related token. pRelated.AddSearchCriteria("%GET_RELATED_ITEMS", _ "%GET_REMOTE_RELATED") Related Items See the PCDSearch object. See the AddSearchCriteria method.
%HAS_SUBFOLDERS %HAS_SUBFOLDERS This token is used if a folder has subfolders. Syntax PCDPropertyLists.GetPropertyValue( _ “%HAS_SUBFOLDERS”) Parameters %HAS_SUBFOLDERS The token that identifies whether or not the current folder has subfolders within it. Usage If the current folder has subfolders of its own, the %HAS_SUBFOLDERS token returns the value of “Y”. Example 'Create a property list object. Set PropLists = CreateObject("PCDClient.PCDPropertyLists") 'Set the DM security token. PropLists.
%HAS_SUBFOLDERS Wend Related Items See the PCDPropertyLists object. See the GetPropertyValue method.
%HITLIST %HITLIST This token is used with the %FORM_LIST_TYPE token to retrieve data items referenced on a HITLIST form. Syntax PCDDocObject.SetProperty(“%FORM_LIST_TYPE”, _ “%HITLIST”) Parameters %FORM_LIST_TYPE The token identifier that indicates the current command line identifies the type of form that the list operation is to retrieve. %HITLIST The token identifier that indicates a HITLIST search is to take place. Example 'Create an object to get property info about forms.
%HITLIST Related Items See the PCDDocObject object. See the SetProperty method.
%ISTREAM_STATSTG_CBSIZE_LOWPART %ISTREAM_STATSTG_CBSIZE_LOWPART This token returns the size of a stream. Syntax PCDGetStream.GetPropertyValue( _ “%ISTREAM_STATSTG_CBSIZE_LOWPART”) Parameters %ISTREAM_STATSTG_ CBSIZE_LOWPART The token that returns the size of the content stream in bytes. Example 'Get the file stream. Set pGetStream = pGetDoc.GetPropertyValue("%CONTENT") 'Get the size. Dim VerFileSize As Long Set VerFileSize = pGetStream.
%LOCK %LOCK This token is used in conjunction with the %STATUS token to lock a document. See %STATUS for further information. Syntax PCDDocObject.SetProperty(“%STATUS”, “%LOCK”) Parameters %STATUS The token that indicates that this command statement adjusts the status of the document. %LOCK The token identifier that indicates that the DM system should lock the document. Example See the %STATUS example on page 472. Related Items See the PCDDocObject object. See the SetProperty method.
%LOCK_FOR_CHECKOUT %LOCK_FOR_CHECKOUT This token is used in conjunction with the %STATUS token to lock and check out a document. See %STATUS for further information. Syntax PCDDocObject.SetProperty(“%STATUS”, _ “%LOCK_FOR_CHECKOUT”) Parameters %STATUS The token that indicates that this command statement adjusts the status of the document. %LOCK_FOR_CHECKOUT The token identifier that indicates that the DM system should lock the document and check it out to the specified user.
%LOOKUP_ID %LOOKUP_ID This token is used to set the ID of the hit-list form that controls the data that will be returned by the look-up operation. Syntax PCDDocObject.SetProperty(“%LOOKUP_ID”, _ strHitlistName) Parameters %LOOKUP_ID The token identifier that informs the DM Server of the name of the hit-list form it will use in the current look-up operation.
%LOOKUP_ID See the SetProperty method.
%MAKE_READ_ONLY %MAKE_READ_ONLY This token is used in conjunction with the %STATUS token to set a document so it cannot be altered. See %STATUS for further information. This token is also used with the %VERSION_DIRECTIVE token to set a version so it cannot be altered. See %VERSION_DIRECTIVE for further information. Syntax PCDDocObject.SetProperty(“%STATUS”, _ “%MAKE_READ_ONLY”) PCDDocObject.
%MAKE_READ_ONLY 5 Set the %OBJECT_IDENTIFIER token equal to the document number of the item that is to be made read only. 6 If working with a document, set the %STATUS token equal to %MAKE_READ_ONLY, indicating that you want to make this document read only. If working with a document version, set the %VERSION_DIRECTIVE token equal to %MAKE_READ_ONLY, indicating that you want to make this version read only. 7 Execute the Update method.
%MAXDAYS %MAXDAYS If there are many entries in the ACTIVITY table, a search for recently edited documents (RED) can return many records. The %MAXDAYS token can be used to limit the number of days that a RED search examines. Syntax PCDRecentDoc.AddSearchCriteria(“%MAXDAYS”, “30”) PCDSearch.AddSearchCriteria( _ “%MAXDAYS”, strNumDays) Parameters %MAXDAYS The token identifier that indicates that the maximum number of days is being set for the current search.
%NUM_COMPONENTS %NUM_COMPONENTS Where the document is comprised of multiple files (for example, as is the case with some CAD/CAM engineering software), use this token to get the number of components that comprise the current document. For documents that are not comprised of multiple files, the %NUM_COMPONENTS token returns the number of properties returned in the search result set. (This same value is returned by use of the GetRowsFound method.) Syntax PCDGetDoc.
%OBJECT_IDENTIFIER %OBJECT_IDENTIFIER The %OBJECT_IDENTIFIER token is used to set the document ID number of a document or or to retrieve a search object’s identifier. Syntax PCDDocObject.SetProperty(“%OBJECT_IDENTIFIER”, _ lDocID) PCDDocObject.GetPropertyValue( _ “%OBJECT_IDENTIFIER”) PCDSearch.AddSearchCriteria( _ “%OBJECT_IDENTIFIER”, lDocID) PCDSearch.
%OBJECT_IDENTIFIER 'Execute the search. pSearch.
%OBJECT_TYPE_ID %OBJECT_TYPE_ID Use this token to specify the form that is to be used in the operation. Syntax PCDDocObject.SetProperty(“%OBJECT_TYPE_ID”, _ strFormName) Parameters %OBJECT_TYPE_ID The token identifier that indicates that this statement specifies the name of the form that is to be used. strFormName A string variable that contains the name of the form that is to be used for this operation. Example 'Create a doc object. Set pDocObject = CreateObject("PCDClient.
%ORDER_BY %ORDER_BY This token is used to specify the field on the form that controls the sort order. Syntax PCDPropertyLists.SetProperty(“%ORDER_BY”, _ strDisplayName) Parameters %ORDER_BY The token identifier that this command statement idenfifies the field on the form that controls the sort order. strDisplayName The name of the field as shown on the form, either as a string variable or enclosed within double quote marks. Example 'Create a property lists object. PropLists = CreateObject("PCDClient.
%PCD_DELETEVERSION %PCD_DELETEVERSION This token is used with the %VERSION_DIRECTIVE token to delete the specified version of the current document. Syntax PCDDocObject.SetProperty(“%VERSION_DIRECTIVE”, _ “%PCD_DELETEVERSION”) Parameters %VERSION_DIRECTIVE The token that indicates that this command statement adjusts the document version settings. %PCD_DELETEVERSION The token identifier that indicates that the specified version of the current document is being deleted.
%PCD_NEW_VERSION %PCD_NEW_VERSION This token is used with the %VERSION_DIRECTIVE token to create a new document version. See %VERSION_DIRECTIVE for further information. Syntax PCDDocObject.SetProperty(“%VERSION_DIRECTIVE”, _ “%PCD_NEW_VERSION”) Parameters %VERSION_DIRECTIVE The token that indicates that this command statement adjusts the document version settings. %PCD_NEW_VERSION The token identifier that indicates that a new version is being created for the specified document version.
%PCD_NEWSUBVERSION %PCD_NEWSUBVERSION This token is used with the %VERSION_DIRECTIVE token to create a new document sub-version. See %VERSION_DIRECTIVE for further information. Syntax PCDDocObject.SetProperty(“%VERSION_DIRECTIVE”, _ “%PCD_NEW_SUBVERSION”) Parameters %VERSION_DIRECTIVE The token that indicates that this command statement adjusts the document version settings.
%PCD_PARM_HTML_RENDERING %PCD_PARM_HTML_RENDERING A document can be rendered in HTML, RIFF or native format to the browser. To render it in HTML, a license should be installed on DM Server. Use this tokenverifies that the appropriate license has been installed. Syntax PCDDocObject.GetPropertyValue( _ “%PCD_PARM_HTML_RENDERING”) Parameters %PCD_PARM_HTML_ RENDERING The token identifier that indicates that the DM Server is to be checked for a valid license that allows documents to be rendered in HTML.
%PCD_PARM_HTML_RENDERING If (strHTMLEnabled = “Y”) Then MsgBox(“A license has been installed on this DM Server.”) Else MsgBox(“No license has been installed on this DM Server.”) End If Related Items See the PCDDocObject object. See the GetPropertyValue method.
%PCD_PARM_LIB_SETTINGS %PCD_PARM_LIB_SETTINGS This token retrieves DM Webtop library configuration parameters that are stored in the SYSTEMPARAMETERS.INC file. Syntax PCDPropertyList.SetProperty( _ “%PCD_PARM_LIB_SETTINGS”, _ strParmName) Parameters %PCD_PARM_LIB_ SETTINGS The token identifier that requests the specified library configuration parameter. strParmName The name of the configuration parameter that is being requested. Example 'Create a document object. Set pObj = CreateObject("PCDClient.
%PCD_UPDATE_VERSION %PCD_UPDATE_VERSION This token is used with the %VERSION_DIRECTIVE token to update create a document version to reflect modifications that have been made to it. See %VERSION_DIRECTIVE for further information. Syntax PCDDocObject.SetProperty(“%VERSION_DIRECTIVE”, _ “%PCD_UPDATE_VERSION”) Parameters %VERSION_DIRECTIVE The token that indicates that this command statement adjusts the document version settings.
%PR_ACCESS_CONTROL %PR_ACCESS_CONTROL This token identifies whether or not a user has authority to control the access of other users to the current document. If the HasRight method indicates that the current user’s rights include access control, then the functionality supported by the GrantRight and RevokeRight methods are enabled for this user. Syntax PCDDocObject.
%PR_ACCESS_CONTROL pDocObject.SetProperty("%VERSION_ID", version) 'Get the requested information. pDocObject.Fetch() 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the doc's effective rights for this user. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%PR_ACCESS_CONTROL", _ intAccessRights)) Then 'This user cannot control access to this document.
%PR_CONTENT_COPY %PR_CONTENT_COPY This token identifies whether or not a user has authority to copy the contents of the current document. Syntax PCDDocObject.HasRight(“%PR_CONTENT_COPY”, _ intAccessRights) Parameters %PR_CONTENT_COPY The token that indicates the application should report whether or not the user has sufficient rights to copy the content of the document. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer.
%PR_CONTENT_COPY 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the doc's effective rights for this user. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If NOT (pDocObject.HasRight("%PR_CONTENT_COPY", _ intAccessRights)) Then 'Process the error condition. End If Related Items See the PCDDocObject object.
%PR_CONTENT_DELETE %PR_CONTENT_DELETE This token identifies whether or not a user has authority to delete the contents of the current document. Syntax PCDDocObject.HasRight(“%PR_CONTENT_DELETE”, _ intAccessRights) Parameters %PR_CONTENT_DELETE The token that indicates the application should report whether or not the user has sufficient rights to delete the content of the document. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer.
%PR_CONTENT_DELETE 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the document's effective rights for this user. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If NOT (pDocObject.HasRight("%PR_CONTENT_DELETE", _ intAccessRights)) Then 'Process the error condition. End If Related Items See the PCDDocObject object.
%PR_CONTENT_EDIT %PR_CONTENT_EDIT This token identifies whether or not a user has authority to edit the contents of the current document. Syntax PCDDocObject.HasRight(“%PR_CONTENT_EDIT”, _ intAccessRights) Parameters %PR_CONTENT_EDIT The token that indicates the application should report whether or not the user has sufficient rights to edit the content of the document. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer.
%PR_CONTENT_EDIT 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the doc's effective rights for this user. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%PR_CONTENT_EDIT", _ intAccessRights)) Then 'Process the error condition. End If Related Items See the PCDDocObject object.
%PR_CONTENT_RETRIEVE %PR_CONTENT_RETRIEVE This token identifies whether or not a user has authority to retrieve the content of the current document. Syntax PCDDocObject.HasRight(“%PR_CONTENT_RETRIEVE”, _ AccessRights) Parameters %PR_CONTENT_RETRIEVE The token that indicates the application should report whether or not the user has sufficient rights to retrieve the content of the document. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer.
%PR_CONTENT_RETRIEVE 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the user's effective rights for this document. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%PR_CONTENT_RETRIEVE", _ intAccessRights)) Then 'The current user does not have sufficient authority to 'retrieve the contents of the current document. End If Related Items See the PCDDocObject object.
%PR_CONTENT_VIEW %PR_CONTENT_VIEW This token identifies whether or not a user has authority to view the content of the current document. Syntax PCDDocObject.HasRight(“%PR_CONTENT_VIEW”, _ intAccessRights) Parameters %PR_CONTENT_VIEW The token that indicates the application should report whether or not the user has sufficient rights to view the content of the document. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer.
%PR_CONTENT_VIEW 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the doc's effective rights for this user. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%PR_CONTNET_VIEW", _ intAccessRights)) Then 'The user does not have sufficient rights to view the 'content of this document. End If Related Items See the PCDDocObject object.
%PR_EDIT %PR_EDIT This token identifies whether or not a user has authority to edit the current document. Syntax PCDDocObject.HasRight(“%PR_CONTENT_EDIT”, _ intAccessRights) Parameters %PR_CONTENT_EDIT The token that indicates the application should report whether or not the user has sufficient rights to edit the content of the document. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer..
%PR_EDIT 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the doc's effective rights for this user. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%PR_EDIT", intAccessRights)) Then 'The user is not authorized to edit this document. End If Related Items See the PCDDocObject object.
%PR_VIEW %PR_VIEW This token identifies whether or not a user has authority to view the profile of the current document. Syntax PCDDocObject.HasRight(“%PR_VIEW”, _ intAccessRights) Parameters %PR_VIEW The token that indicates the application should report whether or not the user has sufficient rights to view the content of the document. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer. Usage The HasRight method describes the access rights setting for this token.
%PR_VIEW 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the user's effective rights for this document. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%PR_VIEW", intAccessRights)) Then 'The user does not have sufficient access rights to view 'the profile of the current document. End If Related Items See the PCDDocObject object.
%PRIMARY_KEY %PRIMARY_KEY This token allows the application to get the SYSTEM_ID column. Syntax PCDSearch.AddSearchCriteria(“%PRIMARY_KEY”, _ strDocID) Parameters %PRIMARY_KEY The token identifier that indicates the primary key is to be returned. strDocID The document ID number of the object for which the system ID number is to be returned. Example 'Create a search object. Set pDocNumber = CreateObject("PCDClient.PCDSearch.1") 'Check for errors.
%PROFILE %PROFILE This token is used to return information about the default profile form for the user's primary group. Syntax PCDDocObject.SetProperty(“%FORM_LIST_TYPE”, _ “%PROFILE”) Parameters %FORM_LIST_TYPE The token that indicates the current command line identifies the type of form that the list operation is to retrieve. %PROFILE The token identifier that indicates information about the default Profile form is to be retrieved. Example 'Create a doc object.
%PROFILE Related Items See the PCDDocObject object. See the SetProperty method. See the %FORM_LIST_TYPE token.
%PROPERTYNAME %PROPERTYNAME The Execute method that PCDLookup supports returns both data and metadata. The %PROPERTYNAME token is used to retrieve the name of the property as shown on the base form. Usually, this is the name of the column in the SQL database. Syntax PCDLookup.GetMetaPropertyValue(“%PROPERTYNAME”) Parameters %PROPERTYNAME The token identifier used to request the name of the property. Example 'Create the object. Set pClient = CreateObject("PCDClient.PCDLookup") 'Set the DM security token.
%PROPERTYNAME Related Items See the PCDLookup object. See the GetMetaPropertyValue method.
%PROPERTYTYPE %PROPERTYTYPE The Execute method that PCDLookup supports returns both data and metadata. The %PROPERTYTYPE token is used to retrieve the data type of the property as shown on the base form. Syntax PCDLookup.GetMetaPropertyValue(“%PROPERTYTYPE”) Parameters %PROPERTYTYPE The token identifier used to request the data type of the property. Example 'Create the object. Set pClient = CreateObject("PCDClient.PCDLookup") 'Set the DM security token. pClient.SetDST(strDST) 'Set the form. pClient.
%PROPERTYTYPE See the GetMetaPropertyValue method.
%PUBLISH_VERSION %PUBLISH_VERSION Use this token to publish a document version. Returns The %PUBLISH_VERSION token returns SUCCESS if the document version was published without error. If the user does not have sufficient security rights to make the document version read only, then a PCD_ERR_INSUFFICIENT_RIGHTS error will be returned. Usage To publish a version, follow the following steps: 1 Create a PCDClient.PCDDocObject. 2 Set the object type to whatever value is appropriate.
%PUBLISH_VERSION %PCD_DELETEVERSION %PCD_NEW_VERSION %PCD_NEWSUBVERSION %PCD_UPDATE_VERSION %REMOVE_READ_ONLY %UNPUBLISH_VERSION %VERSION_DIRECTIVE DM API TOKENS 445
%QS_DELETE %QS_DELETE This token identifies whether or not a user has authority to delete a Quick Search. Syntax PCDDocObject.HasRight(“%QS_DELETE”, _ intAccessRights) Parameters %QS_DELETE The token that indicates the application should report whether or not the user has sufficient rights to delete the specified Quick Search. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer. Usage The HasRight method describes the access rights setting for this token.
%QS_DELETE 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the user’s effective rights for this document. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to edit the profile. If Not (pDocObject.HasRight("%QS_DELETE", intAccessRights)) Then 'The user does not have sufficient access rights to 'delete the specified Quick Search. End If Related Items See the PCDDocObject object.
%QS_EDIT %QS_EDIT This token identifies whether or not a user has authority to edit the specified Quick Search. Syntax PCDDocObject.HasRight(“%QS_EDIT”, _ intAccessRights) Parameters %QS_EDIT The token that indicates the application should report whether or not the user has sufficient rights to edit the specified Quick Search. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer. Usage The HasRight method describes the access rights setting for this token.
%QS_EDIT 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the user's effective rights for this document. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure the user has rights to edit the profile. If Not (pDocObject.HasRight("%QS_EDIT", intAccessRights)) Then 'The user does not have sufficient access rights to edit 'the specified Quick Search. End If Related Items See the PCDDocObject object.
%QS_VIEW %QS_VIEW This token identifies whether or not a user has authority to view the specified Quick Search. Syntax PCDDocObject.HasRight(“%QS_VIEW”, _ intAccessRights) Parameters %PR_VIEW The token that indicates the application should report whether or not the user has sufficient rights to view the Quick Search. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer.. Usage The HasRight method describes the access rights setting for this token.
%QS_VIEW 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the doc's effective rights for this user. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to view and execute the search form. If Not (pDocObject.HasRight("%QS_VIEW", intAccessRights)) Then 'The user is a trustee for this Quick Search. The user 'cannot execute this Quick Search. End If Related Items See the PCDDocObject object.
%RECENTACTIVITYDATE %RECENTACTIVITYDATE This token allows to sort the items returned by a search according to the time they were most recently modified. Syntax PCDRecentDoc.AddOrderByProperty( _ “%RECENTACTIVITYTIME”, _ blnTrueFalse) Parameters %RECENTACTIVITYTIME The token identifier that indicates that the retrieved data should be sorted in order by the time each was created. blnTrueFalse A Boolean value that indicates whether the data should be sorted in ascending or descending order.
%RECENTACTIVITYDATE 'Show data for the retrieved documents. While (lngRow < lngRowCount) strDocName = pClient.GetReturnValue(“DOCNAME”) strAuthor = pClient.GetReturnValue(“AUTHOR”) strMessage = strAuthor & “ wrote this document: “ & strDocName MsgBox(strMessage) Wend Related Items See the PCDRecentDoc object. See the AddOrderByProperty method. See the %RECENTACTIVITYDATE token.
%RECENTACTIVITYTIME %RECENTACTIVITYTIME This token allows to sort the items returned by a search according to the time they were most recently modified. Syntax PCDRecentDoc.AddOrderByProperty( _ “%RECENTACTIVITYTIME”, _ blnTrueFalse) Parameters %RECENTACTIVITYTIME The token identifier that indicates that the retrieved data should be sorted in order by the time each was created. blnTrueFalse A Boolean value that indicates whether the data should be sorted in ascending or descending order.
%RELATED_REMOTE_LIBS %RELATED_REMOTE_LIBS This token can be used to specify that a search for related documents should retrieve from remote libraries only. Syntax PCDSearch.AddSearchCriteria( _ “%RELATED_REMOTE_LIBS”, _ strLibraryList) Parameters %RELATED_REMOTE_LIBS The token identifier that directs a search to retrieve only from remote libraries. strLibraryList A comma-delimited list of remote libraries that are to be included in the search. Example 'Create a search object.
%REMOVE_READ_ONLY %REMOVE_READ_ONLY This token is used in conjunction with the %STATUS and %VERSION_DIRECTIVE tokens to remove the read-only setting from a document or a document version. See the %STATUS and %VERSION_DIRECTIVE token descriptions for further information. Syntax PCDDocObject.SetProperty(“%STATUS”, _ “%REMOVE_READ_ONLY”) PCDDocObject.
%REMOVE_READ_ONLY 2 Set the object type (form name) to whatever value is appropriate. 3 Set the DM security token (DST). 4 Set the %TARGET_LIBRARY token equal to the library name. 5 Set the %OBJECT_IDENTIFIER token equal to the document number of the document or document version that is to have its read-only setting removed. 6 Set the %STATUS token equal to %REMOVE_READ_ONLY, indicating that you want to remove the read-only setting for this document. 7 Execute the Update method.
%REMOVE_READ_ONLY RemoveReadOnly Document Token Use the RemoveReadOnly Document token to remove the read-only setting from a document. PH Note: Merge this text into the main discussion of the %REMOVE_READ_ONLY token. Returns The RemoveReadOnly Document method returns SUCCESS if the document was set so it is not read only. This allows the document to be modified. If the user does not have sufficient security rights to remove any read-only setting, then a PCD_ERR_INSUFFICIENT_RIGHTS error will be returned.
%RENDITION_TYPE %RENDITION_TYPE This token is used to check whether the DM Server can deliver documents in BINDER mode. Syntax PCDGetDoc.AddSearchCriteria( _ “%RENDITION_TYPE”, “BINDER”) Parameters %RENDITION_TYPE The token identifier that queries to determine whether or not the DM Server can deliver documents in the specified mode. BINDER The key word that indicates BINDER mode is being specified. Example 'Create a PCDGetDoc object. pGetDoc = CreateObject("PCDClient.PCDGetDoc.
%RENDITION_TYPE pGetDoc.ReleaseResults Related Items See the PCDGetDoc object. See the AddSearchCriteria method.
%RIGHT8 %RIGHT8 This token identifies whether or not a user has authority to assign a document or record to a file. Syntax PCDDocObject.HasRight(“%RIGHT9”, _ intAccessRights) Parameters %RIGHT9 The token that indicates the application should report whether or not the user has sufficient rights to assign a Document or Record to a File. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer. Usage The HasRight method describes the access rights setting for this token.
%RIGHT8 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the user's effective rights for this document object. Set intAccessRights = _ pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to assign a document or record 'to a File. If Not (pDocObject.HasRight("%RIGHT8", intAccessRights)) Then 'The user does not have sufficient access rights to 'assign a document or record to a file. End If Related Items See the PCDDocObject object.
%RIGHT9 %RIGHT9 This token identifies whether or not a user has authority to assign a document or record to a file. Syntax PCDDocObject.HasRight(“%RIGHT9”, _ intAccessRights) Parameters %RIGHT9 The token that indicates the application should report whether or not the user has sufficient rights to assign a Document or Record to a File. intAccessRights The user’s access rights. The rights mask is an unsigned 32-bit integer. Usage The HasRight method describes the access rights setting for this token.
%RIGHT9 'Check for errors. checkError(pDocObject, "ERROR_DOCPROFILEDSP_RIGHTS") 'Get the user's effective rights for this document. Set intAccessRights = pDocObject.GetReturnProperty("%EFFECTIVE_RIGHTS") 'Make sure user has rights to view only published documents 'and records. If Not (pDocObject.HasRight("%RIGHT9", intAccessRights)) Then 'The user does not have sufficient access rights to view 'only published documents. End If Related Items See the PCDDocObject object.
%SCORE_GRAPHIC %SCORE_GRAPHIC This token is used when a full text search is performed. It expresses the calculated relevance of each returned item as a value from 1 to 5. Lower values have greater relevance. Synta PCDSearch.AddReturnProperty(“%SCORE_GRAPHIC”) Parameters %SCORE_GRAPHIC Return the search relevance as a numeric value that ranges from 1 to 5. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.1") 'Return the search relevance as a value from 1 to 5 pClient.
%SCORE_GRAPHIC %FT_SCORE %FT_TIMESTAMP %FT_VCC_LIST %FT_VCC_RULES %SCORE_PERCENT 466 CHAPTER 5
%SCORE_PERCENT %SCORE_PERCENT This token is used when a full text search is performed. It expresses the relevance of the search criteria to the document. The relevance score is expressed as a percentage. Syntax PCDSearch.AddReturnProperty(“%SCORE_PERCENT”) Parameters %SCORE_PERCENT Express the relevance value returned by the search process as a percent. Example 'Create a search object. Set pClient = CreateObject("PCDClient.PCDSearch.1") 'Return the search relevance as a percentage. pClient.
%SCORE_PERCENT %FT_SCORE %FT_TIMESTAMP %FT_VCC_LIST %FT_VCC_RULES %SCORE_GRAPHIC 468 CHAPTER 5
%SEARCH %SEARCH This token is used in conjunction with %FORM_LIST_TYPE to return all search forms available to the user. Syntax PCDDocObject.SetProperty(“%FORM_LIST_TYPE”, _ “%SEARCH”) Parameters %FORM_LIST_TYPE The token that indicates the current command line identifies the type of form that the list operation is to retrieve. %SEARCH The token identifier that specifies that the list of search forms available to the user should be returned. Example 'Create a doc object.
%SEARCH See the %FORM_LIST_TYPE token.
%SECURITY %SECURITY This token is used to retrieve the user’s access rights for the specified document(s). Each user may be granted different privileges (for example, allowed to view, not allowed to copy, etc.) Syntax PCDSearch.AddReturnProperty(“%SECURITY”) Parameters %SECURITY The token identifier that the current user’s security mask (access priviliges) are to be returned for the specified document(s). Example 'Create a search object. Set pDoc = CreateObject("PCDClient.PCDSearch.
%STATUS %STATUS This token is used to change the status of a document. The document status can be set to one of the following: • Lock the document, using the %LOCK token. • Lock the document and check it out to the specified user, by use of the %LOCK_FOR_CHECKOUT token. • Make the document read only using the %MAKE_READ_ONLY token. • Remove the read-only setting from the document, using the %REMOVE_READ_ONLY token. • Remove the read only status from the document, using the %UNLOCK token.
%STATUS pDocObject.SetProperty( “%OBJECT_IDENTIFIER”, strDocNum ) 'Set the status. pDocObject.SetProperty( "%STATUS", "%REMOVE_READ_ONLY" ) 'Perform the update. pDocObject.Update Related Items See the PCDDocObject object. See the SetProperty method.
%TARGET_LIBRARY %TARGET_LIBRARY This token specifies the library to use for various actions (such as searching or creating documents). Syntax PCDDocObject.SetProperty(“%TARGET_LIBRARY”, _ strLibName) Parameters %TARGET_LIBRARY The token identifier that indicates that the target library is being set. strLibName The name of the library. Usage If no target library is specified, the default value is the current library. Example 'Create a doc object. pDocObject = CreateObject("PCDClient.PCDDocObject.
%TITLE %TITLE The Execute method that PCDLookup supports returns both data and metadata about the object specified in the lookup operation. The %TITLE token is used to retrieve the title in the lookup list box for this column. Syntax PCDLookup.GetMetaPropertyValue(“%TITLE”) Parameters %TITLE The token identifier used to request the title in the lookup list box for this property. Example 'Create the object. Set pClient = CreateObject("PCDClient.PCDLookup") 'Set the DM security token. pClient.
%TITLE Related Items See the PCDLookup object. See the GetMetaPropertyValue method.
%TRUSTEE_ID %TRUSTEE_ID The %TRUSTEE_ID token, together with the %TRUSTEE_RIGHTS and %TRUSTEE_TYPE tokens, allows trustee settings for a document to be set or modified. Users who can modify a document object are called trustees. Syntax PCDPropertyList.AddProperty(“%TRUSTEE_ID”, _ vntUserName) Parameters %TRUSTEE_ID The token identifier used to indicate that the name of the trustee is being specified. vntUserName The name of the Trustee, as shown in the USER_ID column of the PEOPLE table.
%TRUSTEE_ID %TRUSTEE_TYPE 478 CHAPTER 5
%TRUSTEE_RIGHTS %TRUSTEE_RIGHTS The %TRUSTEE_RIGHTS token, together with the %TRUSTEE_ID and %TRUSTEE_TYPE tokens, allows trustee settings for a document to be set or modified. Users who can modify a document object are called trustees. Syntax PCDPropertyList.AddProperty(“%TRUSTEE_RIGHTS”, _ vntRights) Parameters %TRUSTEE_RIGHTS The token identifier used to indicate that the rights of the trustee are being identified.
%TRUSTEE_RIGHTS See the AddProperty method.
%TRUSTEE_TYPE %TRUSTEE_TYPE The %TRUSTEE_TYPE token, together with the %TRUSTEE_ID and %TRUSTEE_RIGHTS tokens, allows trustee settings for a document to be set or modified. Users who can modify a document object are called trustees. Syntax PCDPropertyList.AddProperty(“%TRUSTEE_TYPE”, _ vntUserType) Parameters %TRUSTEE_TYPE The token identifier used to indicate that the type of trustee is being identified. vntUserType The type of Trustee.
%TRUSTEE_TYPE Related Items See the PCDPropertyList object. See the AddProperty method.
%TRUSTEES_ADD %TRUSTEES_ADD Use this token to add new entities (people, groups, etc.) to the current trustee list. Syntax PCDDocObject.SetProperty(“%TRUSTEES_UPDATE”, _ “%TRUSTEES_ADD”) Parameters %TRUSTEES_UPDATE The token identifier that indicates trustee information is about to be updated. %TRUSTEES_ADD The token identifier that indicates one or more trustees is to be added to the current list of trustees. Example 'Create a document object. Set pDocObject = CreateObject("PCDClient.PCDDocObject.
%TRUSTEES_ADD %TRUSTEES_REMOVE %TRUSTEES_SET %TRUSTEES_UPDATE 484 CHAPTER 5
%TRUSTEES_REMOVE %TRUSTEES_REMOVE Use this token to delete one or more trustees from the current list of trustees for the specified object. Syntax PCDDocObject.SetProperty(“%TRUSTEES_UPDATE”, _ “%TRUSTEES_REMOVE”) Parameters %TRUSTEES_UPDATE The token identifier that indicates trustee information is about to be updated. %TRUSTEES_REMOVE The token identifier that indicates one or more of the trustees is to be removed from the trustee list. Example 'Create a document object.
%TRUSTEES_REMOVE %TRUSTEES_ADD %TRUSTEES_SET %TRUSTEES_UPDATE 486 CHAPTER 5
%TRUSTEES_SET %TRUSTEES_SET Use this token to set trustee information. Syntax PCDDocObject.SetProperty(“%TRUSTEES_UPDATE”, _ “%TRUSTEES_SET”) Parameters %TRUSTEES_UPDATE The token identifier that indicates trustee information is about to be updated. %TRUSTEES_SET The token identifier that indicates the rights of one or more of the trustees has changed and should be saved. Example 'Create a document object. Set pDocObject = CreateObject("PCDClient.PCDDocObject.1") 'Set the DM security token.
%TRUSTEES_SET %TRUSTEES_UPDATE 488 CHAPTER 5
%TRUSTEES_UPDATE %TRUSTEES_UPDATE Use this token to set trustee information. Syntax PCDDocObject.SetProperty(“%TRUSTEES_UPDATE”, _ vntAction) Parameters %TRUSTEES_UPDATE The token identifier that indicates trustee information is about to be updated. vntAction One of the three trustee actions supported by the %TRUSTEES_UPDATE token. Usage The %TRUSTEES_UPDATE token supports the following actions: %TRUSTEES_ADD Add one or more trustees to the current list of trustees.
%TRUSTEES_UPDATE 'Perform the update. pDocObject.Update Related Items See the PCDDocObject object. See the SetProperty method.
%UNLOCK %UNLOCK This token is used in conjunction with the %STATUS token to unlock a document. See the “%STATUS” token on page 472 for further information. Syntax PCDDocObject.SetProperty(“%STATUS”, “%UNLOCK”) Parameters %STATUS The token that indicates that this command statement adjusts the status of the document. %UNLOCK The token identifier that indicates that the DM system should unlock the document. Example See the %STATUS example on page 472. Related Items See the PCDDocObject object.
%UNPUBLISH_VERSION %UNPUBLISH_VERSION This token is used with the %VERSION_DIRECTIVE token to reset a previously published document version so it is unpublished. See the “%VERSION_DIRECTIVE” token on page 500 for further information. Syntax PCDDocObject.SetProperty(“%VERSION_DIRECTIVE”, _ “%UNPUBLISH_VERSION”) Parameters %VERSION_DIRECTIVE The token that indicates that this command statement adjusts the document version settings.
%UNPUBLISH_VERSION 5 Set the %OBJECT_IDENTIFIER token equal to the document number of the document version that is have its published status removed. 6 Set the %VERSION_ID token equal to the version number of the document version that is to have its published status removed. 7 Set the %VERSION_DIRECTIVE token equal to %UNPUBLISH_VERSION, indicating that you want to remove the published status of the specified document version. 8 Execute the Update method.
%USER_ID %USER_ID This token is used to set the user ID property for various actions. Syntax PCDDocObject.SetProperty(“%USER_ID”, _ “vntUserName”) Parameters %USER_ID The token identifier that indicates the user name is being identified. vntUserName The name of the user. Example 'Create a doc object. Set pObj = CreateObject("PCDClient.PCDDocObject") 'Set the DM security token. pObj.SetDST(strDST) 'Set the object (form) type. pObj.SetObjectType(“ImptDocRetrievalForm”) 'Set the userID property. pObj.
%VERIFY_ONLY %VERIFY_ONLY This token allows you to verify that the attributes are correct for the document. This is used primarily when a document is first created. You might want to do this to make sure no errors are returned. Syntax PCDDocObject.SetProperty(“%VERIFY_ONLY”, _ strYesNo) Parameters %VERIFY_ONLY The token identifier that indicates a check of document attributes is going to take place. strYesNo A string that resolves to either %YES or %NO.
%VERIFY_ONLY Related Items See the PCDDocObject object. See the SetProperty method.
%VERSION_AUTHOR %VERSION_AUTHOR This token allows to specify the author of the document version. Syntax PCDDocObject.SetProperty(“%VERSION_AUTHOR”, _ vntAuthorName) Parameters %VERSION_AUTHOR The token identifier that indicates the author is being specified. vntAuthorName The USER_ID of the document version author. Example 'Create a document object. Set pObj = CreateObject("PCDClient.PCDDocObject") 'Set the DM security token. pObj.SetDST(strDST) 'Set the author name. pDocObject.
%VERSION_COMMENT %VERSION_COMMENT This token allows you to specify the comment for the document version. Syntax PCDDocObject.SetProperty(“%VERSION_COMMENT”, _ strCommentText) Parameters %VERSION_COMMENT The token that indicates the comment for this version is being set. strCommentText A string variable (or literal text in double quotes) that contains the comment for the specified document version.
%VERSION_COMMENT See the SetProperty method.
%VERSION_DIRECTIVE %VERSION_DIRECTIVE This token indicates that any of several supported actions is to affect the specified document version. Syntax PCDDocObject.SetProperty(“%VERSION_DIRECTIVE”, _ vntVersionID) Parameters %VERSION_DIRECTIVE The token identifier that indicates a version directive is being set. strVersionAction Any of the actions that the %VERSION_DIRECTIVE token supports.
%VERSION_DIRECTIVE pDelObject.SetDST( strDST ) 'Set the version ID pDelObject.SetProperty( "%VERSION_ID", version) 'Delete the document version. pDelObject.SetProperty( "%VERSION_DIRECTIVE", _ "%PCD_DELETE_VERSION" Related Items See the PCDDocObject object. See the SetProperty method.
%VERSION_ID %VERSION_ID This token allows a specific version ID to be set for the document. Syntax PCDDocObject.GetReturnProperty(“%VERSION_ID”) PCDDocObject.SetProperty(“%VERSION_ID”, _ strVersionID) PCDDocObject.SetProperty(“%VERSION_ID”, _ “%VERSION_TO_INDEX”) PCDGetDoc.AddSearchCriteria(“%VERSION_ID”, _ strVersionID) PCDPutDoc.AddSearchCriteria(“%VERSION_ID”, _ strVersionID) Parameters %VERSION_ID The token identifier that indicates an action is to involve a version.
%VERSION_ID 'Execute the search. pVer.Execute Related Items See the following objects: PCDDocObject PCDGetDoc PCDPutDoc See the following methods: AddSearchCriteria GetProperty SetProperty See the %VERSION_TO_INDEX token.
%VERSION_LABEL %VERSION_LABEL This token is used to retrieve the preview content. Syntax PCDGetDoc.AddSearchCriteria(“%VERSION_LABEL”, _ “PR1”) Parameters %VERSION_LABEL The token identifier that specifies that the version’s preview content is to be returned. PR1 A required parameter that is used in the search. Example 'Create a PCDGetDoc object. pGetDoc = CreateObject("PCDClient.PCDGetDoc.1") 'Set the DM security token. pGetDoc.SetDST(strDST) 'Get the preview content. pGetDoc.
%VERSION_TO_INDEX %VERSION_TO_INDEX This token indentifies a version identified in a search whose content is now to be retrieved. In this circumstance, it can be less complex to identify the version by referencing its location in the data set returned by the initial search operation than in trying to identify it by its document ID number. Syntax PCDDocObject.SetProperty(“%VERSION_ID”, _ “%VERSION_TO_INDEX”) Parameters %VERSION_ID The token identifier that indicates an action is to involve a version.
%VERSION_TYPIST %VERSION_TYPIST This token is used to identify the typist for the specified document version. Syntax PCDDocObject.SetProperty(“%VERSION_TYPIST”, strTypistName) Parameters %VESION_TYPIST This token indicates that the typist associated with the specified document version is being specified. strTypistName The name of the typist, as shown in the USER_ID column of the PEOPLE table in the DM database. Example 'Create a doc object. Set pObj = CreateObject("PCDClient.
%VISIBLE %VISIBLE The Execute method that PCDLookup supports returns both data and metadata. The %VISIBLE token returns a Boolean value that indicates whether or not this lookup column should be displayed to the user. Syntax PCDLookup.GetMetaPropertyValue(“%VISIBLE”) Parameters %VISIBLE The token identifier used to request the flag setting that indicates whether or not this lookup column should be displayed to the user. Example 'Create the object. Set pClient = CreateObject("PCDClient.
%VISIBLE Related Items See the PCDLookup object. See the GetMetaPropertyValue method.