|
Internal functions In addition to the intrinsic functions available in the run-time Business Basic engine, UnForm provides a set of functions specific to its operating environment. Some functions are macros that perform an action, rather than return a value.
This is a sub-set of internal functions that relate specifically to archiving.
• docidexists(lib$,doctype$,docid$) Returns 1 if the document type and ID exists in the library, or 0 if not. • getaddress(book$,entityid$,doctype$,address$) Opens the address book specified, and fills the address$ template with data from the address book entry for entityid$ and doctype$. The address book template can be referenced as address.entityid$, address.doctype$, address.entityname$, address.contactname$, address.to$, and address.combine. The function returns 1 if successful, or 0 if not. • getarc(lib$,doctype$,docid$,subid$, filename$ [,errmsg$]) Retrieve an archive image to a user-specified or temporary file. • getdocidprop(lib$, doctype$ ,docid$, prop$) Sets prop$ to a composite string containing properties about the document specified. These properties include:
Prop.date$ - date in yyyymmdd format Prop.time$ - time in hhmmss format (24-hour clock) Prop.title$ - title string Prop.entityid$ - entity id string Prop.notes$ - notes, which can have CRLF line breaks Prop.keywords$ - semi-colon delimited keywords Prop.categories$ - semi-colon delimited categories with pipe-delimited segments Prop.links$ - semi-colon delimited list of links
If the document type and ID does not exist in the library, each of the fields in the composite string will be empty. Use the docidexists() function to determine if a document exists. • getsubids(lib$,doctype$,docid$[,dlm$]) Returns a list of document archive sub ID’s, delimited by linefeeds or by the specified delimiter. • libexists(lib$) Returns 0 if library lib$ doesn't exist, or 1 if it does. • putaddress(book$,entityid$,doctype$,address$) Opens the address book specified, and adds or updates the address entry identified by entityid$ and doctype$. The address$ template can be created by execution of a getaddress() function, even from an invalid entityid$, then filled with appropriate values. The entityid$ and doctype$ arguments are automatically copied to the address$ template.
The address book template fields can be referenced as address.entityid$, address.doctype$, address.entityname$, address.contactname$, address.to$, and address.combine. • putdocidprop(lib$, doctype$, docid$, prop$) Updates the document properties of the document type and ID in the library specified. The document properties are replaced with the values found in the composite string prop$. These string properties are:
Prop.date$ - date in yyyymmdd format Prop.time$ - time in hhmmss format (24-hour clock) Prop.title$ - title string Prop.entityid$ - entity id string Prop.notes$ - notes, which can have CRLF line breaks Prop.keywords$ - semi-colon delimited keywords Prop.categories$ - semi-colon delimited categories with pipe-delimited segments Prop.links$ - semi-colon delimited list of links
All properties found in the string are updated, so you must first read existing properties using the getdocidprop() function, then modify those properties desired, then update them with this function. This function will not add new documents to a library. It only updates existing ones.
• setlogin(userid$,password$) Sets the login and password to enable the library object to access a library. • subidexists(lib$,doctype$,docid$,subid$) Returns 1 if the document type, document ID, and sub ID exists in the library, or 0 if not. |