Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ThirteenCollaboration Functions (continued)

CreateTask Function

Overview

The CreateTask function creates a new task in a specified location either from a parameter list or array.

Syntax/Parameters

Syntax

string = CreateTask ( string task | string[] task );

Parameters

task

A string structured as a parameter list or as an array of parameters. If a list, the string must be in the form of “property-name: value”. If in an array then the key name is the property name and data is the array entry. The entries must match the list of property names. See Remarks below.

Return Value

A string containing the task ID for the newly created task. If the string is empty, an error occurred. Use the GetLastError and GetLastErrorMessage to retrieve additional information.

Use the GetLastErrorMessage function to retrieve names of any parameters that were ignored. Ignored parameters do not directly result in an error.

If a data store is not available, for example if a project is not open while attempting to add to a project, the last error will be ERROR_FUNCTION_NOT_SUPPORTED. Other errors can be returned by the add function as opposed to the property loader. If an error occurs, a task will not be created.

Remarks

The location of the task to be created has to be placed in the ID or Location property names and must be:

ET — Enterprise

UT — User location

PT — Project

While the resulting task ID will be unique, the task content itself need not be unique.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL