Given a secuTrial server URL, and optionally instance, customer, project id and document id, this function composes a URL to a specific secuTrial instance, customer or form.

build_secuTrial_url(
  server,
  instance = NA,
  customer = NA,
  projid = NA,
  docid = NA
)

Arguments

server

string containing a server URL

instance

(optional) string containing secuTrial instance name

customer

(optional) string containing secuTrial customer label

projid

(optional) string containing secuTrial project identifier

docid

(optional) secuTrial document/form identifer

Value

string containing a URL to desired secuTrial page. Currently we provide no guarantee that the returned URL is valid.

Details

To find the server and instance of a secuTrial database, simply extract the information from the URL that you usually use to log in. For example in:

https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES

  • server id is: server.secutrial.com

  • instance id is: ST21-setup-DataCapture

  • you can find the customer id at the end of the link i.e TES

    Alternatively it can be found in the CustomerAdminTool -> click "Kunden" -> Value in DB column of table on login page.

  • you can find the project id in the AdminTool -> Projects -> left side ID column in the table.

  • you can find docids in secuTrial exports as values in the "mnpdocid" column.

    Alternatively they are noted in the form footers of the DataCapture.

Also note that only the server address has to be provided, the other arguments are optional. Thus, there are different scenarios:

  • if only server address is provided, the output will point to the secuTrial server

  • if secuTrial server and instance are provided, the output will point to the secuTrial instance.

  • if secutrial server, instance and customer id are provided, the output will point to the customer page.

  • if secuTrial server, instance, customer, project and document id are provided, the output will point to a specific secuTrial form.

Examples


# This example, builds pseudo-urls that do not point to an active secuTrial instance.

server <- "server.secutrial.com"
instance <- "ST21-setup-DataCapture"
customer <- "TES"
project <- "7036"
docid <- "181"

build_secuTrial_url(server)
#> [1] "https://server.secutrial.com/"
build_secuTrial_url(server, instance)
#> [1] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture"
build_secuTrial_url(server, instance, customer)
#> [1] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES"
build_secuTrial_url(server, instance, customer, project)
#> [1] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036"
build_secuTrial_url(server, instance, customer, project, docid)
#> [1] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=181"

# examples of docids (mnpdocid)
path <- system.file("extdata", "sT_exports", "lnames",
                    "s_export_CSV-xls_CTU05_long_ref_miss_en_utf8.zip",
                    package = "secuTrialR")
sT_export <- read_secuTrial(path)
#> Read export successfully.
#> The following export options deviate from the suggested specifications:
#> Data from hidden fields is part of the export.
#> Short names was not selected.

# return docids
docids <- sT_export$ctu05baseline$mnpdocid

# make several links with all docids
build_secuTrial_url(server, instance, customer, project, docids)
#>  [1] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=180"
#>  [2] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=184"
#>  [3] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=187"
#>  [4] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=191"
#>  [5] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=199"
#>  [6] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=203"
#>  [7] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=211"
#>  [8] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=216"
#>  [9] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=220"
#> [10] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=222"
#> [11] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=230"
#> [12] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=234"
#> [13] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=238"
#> [14] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=243"
#> [15] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=249"
#> [16] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=255"
#> [17] "https://server.secutrial.com/apps/WebObjects/ST21-setup-DataCapture.woa/wa/choose?customer=TES&projectid=7036&docid=265"