|
obj=new("idpdoc",sourceid$,doctype$,docid$)
The idpdoc object provides methods to manage a single document in an inbound library. It provides identification properties and some IDP-specific values as properties rather than methods, plus offers simpler syntax for some additional methods mirrored in the idp object.
Properties
exists is set to true (1) if the document specified in the new() instantiation function exists.
|
ibsrc$, ibdoctype$, ibdocid$ are three properties that identify the document in the inbound source library. They are given these property names to distinguish them from the library$, doctype$, and docid$ properties that are used when the document is transferred to a document archive library.
|
invaliditems$ is a list of field and identification names and associated error messages. It should not be maintained directly, but rather through the initinvaliditems() and iteminvalid() methods. The list is in tab-separated-values format,
|
jobid$ is the job id of the last job run against this document. Additional details about the job can be accessed in the browser interface.
|
jobname$ is the name of the job assigned to this document, through Image Manager operations or directly via assignment of this property. Note that assigning the property does not run the job.
|
user$ is the UnForm user id assigned to this document. This should be an image manager user. Documents assigned to a user show in the Image Manager pending list for that user. If user$ is null (""), it is available for self-assignment.
|
The following additional properties can be assigned as identification and standard archive properties.
•library$
•doctype$
•docid$
•subid$
•subtitle$
•title$
•entityid$
•date$ (should be in yyyymmdd format)
•categories$ (pipe-delimited segments, semi-colon delimited category indexes)
•keywords$ (semi-colon delimited words)
•notes$
•links$ (semi-colon delimited urls or pipe-separated library|doctype|docid[|subid] strings)
|
Methods
assignto([,userid$]) assigns the document to userid$, or de-assigns it if no userid$ is supplied. De-assigned documents are in the pool of available documents that image manager users can self-assign.
|
delfield(name$) removes a specific custom data field from the document.
|
getdocdataitem$(item$) returns the value of one document data identifier
|
getdocdataitem(item$,value$) fills value$ with the value of a specified document data item. Returns 1 if the item is found.
|
getfield$(name$) returns the custom field data named name$.
|
getfield(name$,value$) fills value$ with the custom field name$ data.
|
getfields$() returns a tab-separated values list of custom field names and values.
|
getmeta$(name$) returns the metadata value of name$. Metadata items are read-only values created at the time a document is imported from a source, such as subject and from addresses of email sources, or file names of directory sources. Each name is prefixed with "@".
|
getmeta(name$,value$) fills value$ with the metadata value for name$, such as @subject, or @filename.
|
getmetas$() returns a tab-separated values list of metadata names and values.
|
initinvaliditems() initializes all validation error messages for the document.
|
iteminvalid(item$,errmsg$[,table]) sets a validation error message on a field or indentification name, using the item naming syntax of "field.name" or "ident.name". If table is supplied and non-0, then the item$ value is interpreted as a tab-separated list, where each row is formatted as:
column [tab] row [tab] error message (i.e. as an expression: str(c)+$09$+str(r)+$09$+errmsg$+$0a$)
This enables cell, column, or row designations for the error message. Columns and rows are 1-based, with 0 indicating an entire column or an entire row.
|
putdocdataitem(item$,value$) updates a specific docdata item, such as library or title.
|
putfield(name$,value$) updates a custom field name$ with the supplied value$.
|
validate() performs all validation tests on the document's identification data and fields. If there is a job assigned to the document, its validation rules are used. Otherwise, the minimum validation required is performed, requiring library and doc type data.
|
|