Skip to contents

Imports all docs from an iDAI.Field-database that is currently running and syncing into a list-object for further processing in R. The function is only useful for the import from iDAI.field 2 or Field Desktop with the respective client running on the same computer or in the same network as the R-script.

Usage

get_idaifield_docs(connection, raw = TRUE, json = FALSE)

Arguments

connection

A connection object as returned by connect_idaifield()

raw

TRUE/FALSE. Should the result already be unnested to resource level using maybe_unnest_docs()? (Default is FALSE.)

json

TRUE/FALSE. Should the function return a JSON-character string? (Default is FALSE.) If TRUE output cannot be processed with the functions from this package. Can be parsed using e.g. jsonlite::fromJSON().

Value

an object (list) of class idaifield_docs if raw = TRUE and idaifield_resources if raw = FALSE that contains all docs/resources in the selected project except for the project configuration. The connection and projectname are attached as attributes for later use. (If json = TRUE, returns a character string in JSON-format.)

Details

When using raw = TRUE (the default) this function will allow you to get the change log for each resource, i.e. which user changed something in the resource at what time and who created it. Setting raw = FALSE will only return a list of the actual data. You can do this at a later time using maybe_unnest_docs() from this package.

See also

Examples

if (FALSE) { # \dontrun{
conn <- connect_idaifield(project = "rtest", pwd = "hallo")
idaifield_docs <- get_idaifield_docs(connection = conn)
} # }