Write File Activity

Description

The Write File activity writes text content to a file on the server. This activity should not be used to write binary content, such as an image, PDF or audio file, as this may produce unreadable output. The Write File Bytes activity should be used for writing binary content. Binary content is the raw numbers, known as bytes, that make up a file. More information on the difference between binary and text files can be found here.

Usage

The Write File activity could be used by mobile users to save field observations, which could then immediately be retrieved at the office with the Read File activity.

Inputs

Path

Required

Type: String

The path of the file to create on the server. The file system or network path must be valid and the server administrator must configure the appropriate permissions to allow writing to the file.

Attempting to write to a file that already exists will overwrite the file.

Text

Required

type: String

The text content to write to the file.

Encoding

Optional

Type: "ASCII" | "Unicode" | "utf-7" | "utf-8" | "utf-16" | "utf-16BE" | "utf-32" | String

The character encoding used to write the file content.

The encoding must be supported by the server or the workflow will fail with an error. If you do not specify an encoding, the server's default encoding will be used. More information on encodings can be found here.

Outputs

This activity has no outputs.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Supported Environments

Environments capable of running this activity

Server

 

Client

Geocortex Web

Geocortex Mobile

Geocortex Viewer for HTML5

Web AppBuilder

Offline Support

This activity does not work when the device is offline.

See Also...

The StreamWriter.WriteAsync(String) function.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.13