Add document (-ADOC) command

The -ADOC command adds a file on the local file system, or a remote file, accessible through http protocol, on the file system as a document in memory and returns the document ID to the map. Alternatively, the -ADOC command can add dynamic data from a map as a document in memory and return the document ID to the map.

Read syntax diagramSkip visual syntax diagram
-ADOC command syntax

>>--- -ADOC----+--------+--+- -URL file_URL-+------------------><
               '-doc_ID-'  '-data_from_map--'   

-URL
Adds a single file, specified by a local file URL (file:///), or a remote file URL (http://), as a document in memory and returns a document ID to the map. The -URL keyword is optional, but you must specify either the -URL, or the data_from_map option on the -ADOC command. doc_ID is an optional parameter. If specified, the -ADOC command associates the user-specified identifier for the document in memory and returns the same. If not specified, the -ADOC command generates a unique document identifier for the document in memory and returns the same.
data_from_map
Adds dynamic data from a map as a document in memory and returns the document ID to the map. The data_from_map is optional, but you must specify either the -URL, or the data_from_map option in the -ADOC command.

Examples

The following example adds the parsewds.txt file as a document in memory and returns the document ID to the map:
=GET("PDF", "-URL file:///C:\parsewds.txt -ADOC")

The following example adds the Hello World!! text string as a document in memory and returns mydocid to the map:

=GET("PDF", "-ADOC mydocid", "Hello World!!")