# System

## ActionResult

Creates an Action Result

#### Syntax <a href="#pragma-line-8" id="pragma-line-8"></a>

```
ActionResult ( [ExecutionResult] [, Message] )
```

#### Parameters <a href="#pragma-line-14" id="pragma-line-14"></a>

***ExecutionResult*** (optional)\
&#x20;The result type ('Success', 'Cancelled', 'NeedsInput', 'Error').\
&#x20;Type: String

***Message*** (optional)\
&#x20;The Message to display to the User.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-25" id="pragma-line-25"></a>

ActionResult

## AddItem

Takes a list of any type and an item of the same type and appends the item to the list.

#### Syntax <a href="#pragma-line-34" id="pragma-line-34"></a>

```
AddItem ( List , Item )
```

#### Parameters <a href="#pragma-line-40" id="pragma-line-40"></a>

**List**\
&#x20;The list which the element is added to.\
&#x20;Type: List\<Any>

**Item**\
&#x20;The element which is be added to the list.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-51" id="pragma-line-51"></a>

List\<Any>

## AddUserToLicense

Adds a user to a license or license item. Throws an error if the license or license item does not support user assignments.

#### Syntax

```
AddUserToLicense ( LicenseId [, ItemId] , OfficeId, UserId )
```

#### Parameters

**LicenseId**\
The ID of the license the user should get assigned to.\
Type: Guid

***ItemId*** (optional)\
&#x20;The ID of the license item the user should get assigned to.\
&#x20;Type: Guid

**OfficeId**\
The office to filter the features (the current office if left empty).\
Type: Guid

**UserId**\
The ID of the user to assign the license to.\
Type: Guid

#### Return Type

Void

## CheckoutDocument

Checks out the document associated to the given Object.

#### Syntax <a href="#pragma-line-60" id="pragma-line-60"></a>

```
CheckoutDocument ( Object )
```

#### Parameters <a href="#pragma-line-66" id="pragma-line-66"></a>

***Object***\
&#x20;The Object which document will be checked out.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-73" id="pragma-line-73"></a>

Void

## Close

Closes the Layout associated to the given Object.

#### Syntax <a href="#pragma-line-82" id="pragma-line-82"></a>

```
Close ( Object )
```

#### Parameters <a href="#pragma-line-88" id="pragma-line-88"></a>

***Object***\
&#x20;The Object which Layout to close.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-95" id="pragma-line-95"></a>

Exit

## Condition

Represents a Condition in a Selection.

#### Syntax <a href="#pragma-line-104" id="pragma-line-104"></a>

```
Condition ( [LeftParenthesis] , FieldId [, IsNegated] , Operator , Value [, RightParenthesis] [, LogicalOperator] )
```

#### Parameters <a href="#pragma-line-110" id="pragma-line-110"></a>

***LeftParenthesis*** (optional)\
&#x20;The left parenthesis to use for the Condition (e. g. '(').\
&#x20;Type: String

***FieldId***\
&#x20;The ID of the Field to compare to.\
&#x20;Type: Guid

***IsNegated*** (optional)\
&#x20;Determines whether the Condition is negated or not (default: false).\
&#x20;Type: Boolean

***Operator***\
&#x20;The Operator used for the comparison ('Equal', 'NotEqual', 'Smaller', 'SmallerOrEqual', 'Greater', 'GreaterOrEqual', 'BeginsWith', 'Contains', 'EndsWith', 'IsNull', 'IsNotNull', 'IsEmpty', 'IsNullOrEmpty', 'IsNotEmpty', 'In').\
&#x20;Type: String

***Value***\
&#x20;The Value to compare to (or NULL for 'IsNull', 'IsEmpty').\
&#x20;Type: String

Converts a Source document to a Target Format. The following conversions are supported:

doc, docm, docx, dot, dotm, dotx, htm, html, log, mht, mhtml, odt, ott, rtf, txt, xhtml, xml to doc, docm, docx, dot, dotm, dotx, htm, html, log, mht, mhtml, odt, ott, rtf, txt, xhtml, xml - eml, msg to eml, msg - csv, doc, docm, docx, dot, dotm, dotx, eml, emlx, epub, fo, htm, html, ics, latex, log, mbox, mht, mhtml, msg, odp, ods, odt, oft, otp, ots, ott, pcl, pdf, pot, potm, potx, pps, ppsm, ppsx, ppt, pptm, pptx, rtf, tnef, txt, vcf, vdw, vdx, vsd, vsdx, vss, vst, vsx, vtx, xhtml, xls, xlsb, xlsm, xlsx, xltm, xltx, xml, xps to pdf

***RightParenthesis*** (optional)\
&#x20;The right parenthesis to use for the Condition (')').\
&#x20;Type: String

***LogicalOperator*** (optional)\
&#x20;The logical Operator combining this and the next Condition ('And', 'Or', 'None').\
&#x20;Type: String

#### Return Type <a href="#pragma-line-141" id="pragma-line-141"></a>

Condition

## Convert

Converts a Source document to a Target Format.

{% hint style="info" %}
The following conversions are supported:

* doc, docm, docx, dot, dotm, dotx, htm, html, log, mht, mhtml, odt, ott, rtf, txt, xhtml, xml **to** doc, docm, docx, dot, dotm, dotx, htm, html, log, mht, mhtml, odt, ott, rtf, txt, xhtml, xml
* eml, msg **to** eml, msg
* bmp, csv, doc, docm, docx, dot, dotm, dotx, emf, eml, emlx, epub, exif, fo, gif, htm, html, icon, ics, jpeg, jpg, latex, log, mbox, mht, mhtml, msg, odp, ods, odt, oft, otp, ots, ott, pcl, pdf, png, pot, potm, potx, pps, ppsm, ppsx, ppt, pptm, pptx, rtf, tiff, tnef, txt, vcf, vdw, vdx, vsd, vsdx, vss, vst, vsx, vtx, wmf, xhtml, xls, xlsb, xlsm, xlsx, xltm, xltx, xml, xps **to** pdf
  {% endhint %}

#### Syntax <a href="#pragma-line-150" id="pragma-line-150"></a>

```
Convert ( Source [, SourceFormat] , TargetFormat )
```

#### Parameters <a href="#pragma-line-156" id="pragma-line-156"></a>

**Source**\
&#x20;The Source document to convert.\
&#x20;Type: Document

***SourceFormat*** (optional)\
&#x20;The Source Format of the document. Analyses the given source if format is omitted.\
&#x20;Type: String

**TargetFormat**\
&#x20;The Target Format to convert to.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-167" id="pragma-line-167"></a>

Document

## CopyContent

Copied Content of the SourceObject to TargetObject. Optional with FieldNameList and Parameters.

#### Syntax <a href="#pragma-line-176" id="pragma-line-176"></a>

```
CopyContent ( SourceObject , TargetObject [, FieldValues] [, Parameters] )
```

#### Parameters <a href="#pragma-line-182" id="pragma-line-182"></a>

***SourceObject***\
&#x20;The Source Object to copy from.\
&#x20;Type: Object

***TargetObject***\
&#x20;Target Object to copy to.\
&#x20;Type: Object

***FieldValues*** (optional)\
&#x20;The values to set (does not copy the Source fields if this is set).\
&#x20;Type: Dictionary\<Any,Any>

***Parameters*** (optional)\
&#x20;The values to set (does copy the Source fields if this is set).\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-201" id="pragma-line-201"></a>

Object

## CopyValues

Copies values from the source to the target while including or excluding specific keys.

#### Syntax

```
CopyValues ( Source , Target [, Include ] [, Exclude ] )
```

#### Parameters <a href="#pragma-line-182" id="pragma-line-182"></a>

**Source**\
&#x20;The source Object or Dictionary\<String,Any> to copy from.\
&#x20;Type: Any

**Target**\
&#x20;The target Object or Dictionary\<String,Any> to copy to.\
&#x20;Type: Any

***Include*** (optional)\
&#x20;A list of keys to include (all by default).\
&#x20;Type: List\<String>

***Exclude*** (optional)\
&#x20;A list of keys to exclude (none by default).\
&#x20;Type: List\<String>

#### Return Type

Void

## CountDocumentPages

Returns the number of pages from a PDF or Word document.

#### Syntax <a href="#pragma-line-210" id="pragma-line-210"></a>

```
CountDocumentPages ( Document )
```

#### Parameters <a href="#pragma-line-216" id="pragma-line-216"></a>

***Document***\
&#x20;The PDF or Word document.\
&#x20;Type: Document

#### Return Type <a href="#pragma-line-223" id="pragma-line-223"></a>

Int

## CreateAndExecuteTemplate

Creates a temporary document template and execute the template.

#### Syntax <a href="#pragma-line-232" id="pragma-line-232"></a>

```
CreateAndExecuteTemplate ( Object , Document [, Parameters] )
```

#### Parameters <a href="#pragma-line-238" id="pragma-line-238"></a>

***Object***\
&#x20;The object which the template is performed on.\
&#x20;Type: Any

***Document***\
&#x20;The template document.\
&#x20;Type: Any

***Parameters*** (optional)\
&#x20;List of Replacing Parameters (key: replace tag, value: replacing text).\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-253" id="pragma-line-253"></a>

Document

## **CreateDocumentFromBase64String**

Creates a document from a Base64 encoded String and returns it.

#### Syntax

```
CreateDocumentFromBase64String ( Content , FileName [, MimeType] ) 
```

#### Parameters

**Content**\
&#x20;The Base64 encoded document content.\
&#x20;Type: String

**Filename**\
&#x20;The file name of the document.\
&#x20;Type: String

***MimeType*** (optional)\
&#x20;The MIME type of the document. Analyses the FileName extension if left empty.\
&#x20;Type: String

#### Return Type

Document

## CreateInstance

Takes OfficeId, ApplicationId, ClassId, Parameters, LinkPath as input, which are used to create an instance. OfficeId, ApplicationId identify the space in which the instance is created. ClassId defines the type of the instance created. Link Path can specify a specific navigation path to the instance. Parameters represent a Dictionary which is a list of Key-Value-Pairs. (see Dictionary)

#### Syntax <a href="#pragma-line-262" id="pragma-line-262"></a>

```
CreateInstance ( OfficeId , ApplicationId , ClassId [, Parameters] [, LinkPath] )
```

#### Parameters <a href="#pragma-line-268" id="pragma-line-268"></a>

***OfficeId***\
&#x20;This ID identifies the Workspace / Office in which the instance is created.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;This ID identifies the Application in which the instance is created.\
&#x20;Type: Guid

***ClassId***\
&#x20;This ID identifies the Class of which the instance is created.\
&#x20;Type: Guid

***Parameters*** (optional)\
&#x20;This is a set of Key-Value-Pairs which is used as parameters for the creation of an object.\
&#x20;Type: Dictionary\<Any,Any>

***LinkPath*** (optional)\
&#x20;Navigation path to the object.\
&#x20;Type: LinkPath

#### Return Type <a href="#pragma-line-291" id="pragma-line-291"></a>

Object

## CreateLinkedInstance

Takes Object, LinkId, Parameters as input, which are used to create a linked instance. The LinkId is used to specify a link which was created in the Class Designer. Parameters represent a Dictionary which is a list of Key-Value-Pairs. (see Dictionary)

#### Syntax <a href="#pragma-line-300" id="pragma-line-300"></a>

```
CreateLinkedInstance ( Object , LinkId [, Parameters] )
```

#### Parameters <a href="#pragma-line-306" id="pragma-line-306"></a>

***Object***\
&#x20;Object which is used as basis of the link.\
&#x20;Type: Object

***LinkId***\
&#x20;The ID of the Link which has been specified in the Class Designer.\
&#x20;Type: Guid

***Parameters*** (optional)\
&#x20;This is a set of Key-Value-Pairs which is used as parameters for the creation of an object.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-321" id="pragma-line-321"></a>

Object

## CreateLinkPath

Creates a Link Path.

#### Syntax <a href="#pragma-line-330" id="pragma-line-330"></a>

```
CreateLinkPath ( [OfficeId] [, ClassId] [, InstanceId] )
```

#### Parameters <a href="#pragma-line-336" id="pragma-line-336"></a>

***OfficeId*** (optional)\
&#x20;The ID of the Office of the Link Path.\
&#x20;Type: Guid

***ClassId*** (optional)\
&#x20;The ID of the Class of the Link Path.\
&#x20;Type: Guid

***InstanceId*** (optional)\
&#x20;The ID of the Instance of the Link Path.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-351" id="pragma-line-351"></a>

Link

## CreateSiblingInstance

Creates an object having the same parent and the same type as the current object.

#### Syntax <a href="#pragma-line-360" id="pragma-line-360"></a>

```
CreateSiblingInstance ( Object [, Parameters] )
```

#### Parameters <a href="#pragma-line-366" id="pragma-line-366"></a>

***Object***\
&#x20;The object a sibling created for.\
&#x20;Type: Object

***Parameters*** (optional)\
&#x20;This is a set of Key-Value-Pairs which is used as parameters for the creation of an object.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-377" id="pragma-line-377"></a>

Object

## DataSourceOptionEscape

Escapes characters used in a data source option.

#### Syntax <a href="#pragma-line-386" id="pragma-line-386"></a>

```
DataSourceOptionEscape ( Value )
```

#### Parameters <a href="#pragma-line-392" id="pragma-line-392"></a>

***Value***\
&#x20;The value that contains the characters to escape.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-399" id="pragma-line-399"></a>

String

## DataSourceOptionObject

Represents an object used in a data source option.

#### Syntax <a href="#pragma-line-408" id="pragma-line-408"></a>

```
DataSourceOptionObject ( Id [, Name] [, Translations] )
```

#### Parameters <a href="#pragma-line-414" id="pragma-line-414"></a>

**Id**\
&#x20;The ID of the option object (must not be escaped).\
&#x20;Type: String

***Name*** (optional)\
&#x20;The name of the option object (must not be escaped). ID is used if the name is not provided.\
&#x20;Type: String

***Translations*** (optional)\
&#x20;The translations of the option name (texts must not be escaped).\
&#x20;Type: List\<Translation>

#### Return Type <a href="#pragma-line-425" id="pragma-line-425"></a>

DataSourceOptionObject

## DataSourceOptionWriter

Creates an escaped data source option string using DataSourceOptionObjects.

#### Syntax <a href="#pragma-line-434" id="pragma-line-434"></a>

```
DataSourceOptionWriter ( Objects )
```

#### Parameters <a href="#pragma-line-440" id="pragma-line-440"></a>

***Objects***\
&#x20;The data source option objects to use to create the option string.\
&#x20;Type: List\<DataSourceOptionObject>

#### Return Type <a href="#pragma-line-447" id="pragma-line-447"></a>

String

## DeleteInstance

Deletes an instance of an object.

#### Syntax <a href="#pragma-line-456" id="pragma-line-456"></a>

```
DeleteInstance ( [Object] )
```

#### Parameters <a href="#pragma-line-462" id="pragma-line-462"></a>

***Object*** (optional)\
&#x20;The Object that will be deleted.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-469" id="pragma-line-469"></a>

Void

## Deprecated!ExecuteScript

Deprecated! Executes a script identified by its ID.

#### Syntax <a href="#pragma-line-478" id="pragma-line-478"></a>

```
Deprecated!ExecuteScript ( ScriptId )
```

#### Parameters <a href="#pragma-line-484" id="pragma-line-484"></a>

***ScriptId***\
&#x20;ID identifying the Script which will be executed.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-491" id="pragma-line-491"></a>

Any

## Deprecated!ExecuteSection

Deprecated! Executes a Template as a Section (usable in other Templates) and returns the result.

#### Syntax <a href="#pragma-line-500" id="pragma-line-500"></a>

```
Deprecated!ExecuteSection ( TemplateId , Language [, OfficeId] [, ApplicationId] [, LinkPath] [, InstanceId] [, Parameters] )
```

#### Parameters <a href="#pragma-line-506" id="pragma-line-506"></a>

***TemplateId***\
&#x20;The ID of the Template to execute.\
&#x20;Type: Guid

***Language***\
&#x20;Not used: The Language of the Template.\
&#x20;Type: Language

***OfficeId*** (optional)\
&#x20;The ID of the Office to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;The ID of the Application to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;The Link Path of the Instance to execute the Template with.\
&#x20;Type: LinkPath

***InstanceId*** (optional)\
&#x20;The ID of the Instance to execute the Template with.\
&#x20;Type: Any

***Parameters*** (optional)\
&#x20;The required Parameters of the Template.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-537" id="pragma-line-537"></a>

Any

## Deprecated!Lock

Deprecated! Locks the execution of a group of statements.

#### Syntax <a href="#pragma-line-546" id="pragma-line-546"></a>

```
Deprecated!Lock ( Block )
```

#### Parameters <a href="#pragma-line-552" id="pragma-line-552"></a>

***Block***\
&#x20;Represents the list of statements.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-559" id="pragma-line-559"></a>

Void

## Dictionary

Creates an empty list of key value pairs.

#### Syntax <a href="#pragma-line-568" id="pragma-line-568"></a>

```
Dictionary ( [Entries] )
```

#### Parameters <a href="#pragma-line-574" id="pragma-line-574"></a>

***Entries*** (optional)\
&#x20;The Entries to set initially.\
&#x20;Type: Entry

#### Return Type <a href="#pragma-line-581" id="pragma-line-581"></a>

Dictionary\<Any,Any>

## Download

Downloads a Document.

#### Syntax <a href="#pragma-line-590" id="pragma-line-590"></a>

```
Download ( Document )
```

#### Parameters <a href="#pragma-line-596" id="pragma-line-596"></a>

***Document***\
&#x20;The Document to download.\
&#x20;Type: Document

#### Return Type <a href="#pragma-line-603" id="pragma-line-603"></a>

Exit

## DownloadFromInstance

Downloads a Document associated with an Object.

#### Syntax <a href="#pragma-line-612" id="pragma-line-612"></a>

```
DownloadFromInstance ( Object )
```

#### Parameters <a href="#pragma-line-618" id="pragma-line-618"></a>

***Object***\
&#x20;The Object with the associated Document.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-625" id="pragma-line-625"></a>

Exit

## Entry

Represents an Entry in a Dictionary.

#### Syntax <a href="#pragma-line-634" id="pragma-line-634"></a>

```
Entry ( Key [, Value] )
```

#### Parameters <a href="#pragma-line-640" id="pragma-line-640"></a>

***Key***\
&#x20;The Key of the Entry.\
&#x20;Type: Any

***Value*** (optional)\
&#x20;The Value of the Entry\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-651" id="pragma-line-651"></a>

Entry

## ExecuteClassAction

Executes an action for a specific class in a specific Office and Application, with specific parameters and LinkPath.

#### Syntax <a href="#pragma-line-660" id="pragma-line-660"></a>

```
ExecuteClassAction ( OfficeId , ApplicationId , ClassId , ActionId [, LinkPath] [, Parameters] )
```

#### Parameters <a href="#pragma-line-666" id="pragma-line-666"></a>

***OfficeId***\
&#x20;This ID identifies the Workspace / Office of the class for which the action should be executed.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;This ID identifies the Application of the class for which the action should be executed.\
&#x20;Type: Guid

***ClassId***\
&#x20;This ID identifies the Class for which the action should be executed.\
&#x20;Type: Guid

***ActionId***\
&#x20;This ID identifies the Action which will be executed.\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;Navigation path to the object. Optional and can be null.\
&#x20;Type: LinkPath

***Parameters*** (optional)\
&#x20;This is a set of Key-Value-Pairs which is used as parameters for a class execution.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-693" id="pragma-line-693"></a>

Any

## ExecuteClassWorkflow

Executes a workflow for a specific class in a specific Office and Application, with specific parameters and LinkPath.

#### Syntax <a href="#pragma-line-702" id="pragma-line-702"></a>

```
ExecuteClassWorkflow ( [OfficeId] [, ApplicationId] , ClassId , WorkflowId [, LinkPath] [, Parameters] )
```

#### Parameters <a href="#pragma-line-708" id="pragma-line-708"></a>

***OfficeId*** (optional)\
&#x20;This ID identifies the Workspace / Office of the class for which the workflow should be executed.\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;This ID identifies the Application of the class for which the workflow should be executed.\
&#x20;Type: Guid

***ClassId***\
&#x20;This ID identifies the Class for which the workflow should be executed.\
&#x20;Type: Guid

***WorkflowId***\
&#x20;This ID identifies the Workflow which will be executed.\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;Navigation path to the object. Optional and can be null.\
&#x20;Type: LinkPath

***Parameters*** (optional)\
&#x20;This is a set of Key-Value-Pairs which is used as parameters for a class execution.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-735" id="pragma-line-735"></a>

Any

## ExecuteFunction

Executes a Function and returns the result.

#### Syntax <a href="#pragma-line-744" id="pragma-line-744"></a>

```
ExecuteFunction ( [FunctionId] [, Parameters] )
```

#### Parameters <a href="#pragma-line-750" id="pragma-line-750"></a>

***FunctionId*** (optional)\
&#x20;The ID of the Function to execute.\
&#x20;Type: Guid

***Parameters*** (optional)\
&#x20;The Parameters required by the Function.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-761" id="pragma-line-761"></a>

Any

## ExecuteInstanceAction

Takes an object, an ActionId and Dictionary of Parameters as input and executes an action on that object.

#### Syntax <a href="#pragma-line-770" id="pragma-line-770"></a>

```
ExecuteInstanceAction ( Object , ActionId [, Parameters] )
```

#### Parameters <a href="#pragma-line-776" id="pragma-line-776"></a>

***Object***\
&#x20;The object which the action is performed on.\
&#x20;Type: Object

***ActionId***\
&#x20;ID identifying the Action which will be executed.\
&#x20;Type: Guid

***Parameters*** (optional)\
&#x20;This is a set of Key-Value-Pairs which is used as parameters for an instance execution.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-791" id="pragma-line-791"></a>

Any

## ExecuteInstanceWorkflow

Takes an object, an WorkflowId and Dictionary of Parameters as input and executes a workflow on that object.

#### Syntax <a href="#pragma-line-800" id="pragma-line-800"></a>

```
ExecuteInstanceWorkflow ( Object , WorkflowId [, Parameters] )
```

#### Parameters <a href="#pragma-line-806" id="pragma-line-806"></a>

***Object***\
&#x20;The object which the workflow is performed on.\
&#x20;Type: Any

***WorkflowId***\
&#x20;ID identifying the Workflow which will be executed.\
&#x20;Type: Any

***Parameters*** (optional)\
&#x20;This is a set of Key-Value-Pairs which is used as parameters for an instance execution.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-821" id="pragma-line-821"></a>

Any

## ExecuteSection2

Executes a Template as a Section (usable in other Templates) and returns the result.

#### Syntax <a href="#pragma-line-830" id="pragma-line-830"></a>

```
ExecuteSection2 ( TemplateId [, TemplateDocument] [, ParentId] [, ParentDocument] [, Language] [, OfficeId] [, ApplicationId] [, LinkPath] [, InstanceId] [, Parameters] )
```

#### Parameters <a href="#pragma-line-836" id="pragma-line-836"></a>

**TemplateId**\
&#x20;The ID of the Template to execute.\
&#x20;Type: Guid

***TemplateDocument*** (optional)\
&#x20;The document to use (instead of the document of the Template with the given ID).\
&#x20;Type: Document

***ParentId*** (optional)\
&#x20;The ID of the Parent Template to use if no parent is defined.\
&#x20;Type: Guid

***ParentDocument*** (optional)\
&#x20;The parent document to use (instead of the document of the Template parent or the Parent with the given ID).\
&#x20;Type: Document

***Language*** (optional)\
&#x20;Not used: The Language of the Template.\
&#x20;Type: Language

***OfficeId*** (optional)\
&#x20;The ID of the Office to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;The ID of the Application to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;The Link Path of the Instance to execute the Template with.\
&#x20;Type: LinkPath

***InstanceId*** (optional)\
&#x20;The ID of the Instance to execute the Template with.\
&#x20;Type: Any

***Parameters*** (optional)\
&#x20;The required Parameters of the Template.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-871" id="pragma-line-871"></a>

Any

## ExecuteTemplate

Executes a Template and returns the Document result.

#### Syntax <a href="#pragma-line-880" id="pragma-line-880"></a>

```
ExecuteTemplate ( TemplateId [, Language] [, OfficeId] [, ApplicationId] [, LinkPath] [, InstanceId] [, Parameters] )
```

#### Parameters <a href="#pragma-line-886" id="pragma-line-886"></a>

***TemplateId***\
&#x20;The ID of the Template to execute.\
&#x20;Type: Guid

***Language*** (optional)\
&#x20;Not used: The Language of the Template.\
&#x20;Type: Language

***OfficeId*** (optional)\
&#x20;The ID of the Office to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;The ID of the Application to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;The Link Path of the Instance to execute the Template with.\
&#x20;Type: LinkPath

***InstanceId*** (optional)\
&#x20;The ID of the Instance to execute the Template with.\
&#x20;Type: Any

***Parameters*** (optional)\
&#x20;The required Parameters of the Template.\
&#x20;Type: Dictionary

#### Return Type <a href="#pragma-line-917" id="pragma-line-917"></a>

Document

## ExecuteTemplate2

Executes a Template and returns the Document result.

#### Syntax <a href="#pragma-line-926" id="pragma-line-926"></a>

```
ExecuteTemplate2 ( TemplateId [, TemplateDocument] [, ParentId] [, ParentDocument] [, Language] [, OfficeId] [, ApplicationId] [, LinkPath] [, InstanceId] [, Parameters] )
```

#### Parameters <a href="#pragma-line-932" id="pragma-line-932"></a>

**TemplateId**\
&#x20;The ID of the Template to execute.\
&#x20;Type: Guid

***TemplateDocument*** (optional)\
&#x20;The document to use (instead of the document of the Template with the given ID).\
&#x20;Type: Document

***ParentId*** (optional)\
&#x20;The ID of the Parent Template to use if no parent is defined.\
&#x20;Type: Guid

***ParentDocument** (optional)*\
&#x20;The parent document to use (instead of the document of the Template parent or the Parent with the given ID).\
&#x20;Type: Document

***Language*** (optional)\
&#x20;Not used: The Language of the Template.\
&#x20;Type: Language

***OfficeId*** (optional)\
&#x20;The ID of the Office to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;The ID of the Application to execute the Template in (used for the Instance).\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;The Link Path of the Instance to execute the Template with.\
&#x20;Type: LinkPath

***InstanceId*** (optional)\
&#x20;The ID of the Instance to execute the Template with.\
&#x20;Type: Any

***Parameters*** (optional)\
&#x20;The required Parameters of the Template.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-967" id="pragma-line-967"></a>

Document

## FinalizeDocument

Finalize the document

#### Syntax <a href="#pragma-line-976" id="pragma-line-976"></a>

```
FinalizeDocument ( Object [, FinalizedOn] [, FinalizedBy] )
```

#### Parameters <a href="#pragma-line-982" id="pragma-line-982"></a>

***Object***\
&#x20;Object which document will be finalized.\
&#x20;Type: Object

***FinalizedOn*** (optional)\
&#x20;Time when the document is finalized. Optional parameter: if not set the current time will be taken.\
&#x20;Type: DateTime

***FinalizedBy*** (optional)\
&#x20;The parameter specifies who is finalizing document. Optional parameter: if not set the current user will be taken.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-997" id="pragma-line-997"></a>

Void

## GetActionValue

Returns a property value of an Action.

#### Syntax <a href="#pragma-line-1006" id="pragma-line-1006"></a>

```
GetActionValue ( OfficeId , ApplicationId , ClassId , ActionKey , ActionPropertyName )
```

#### Parameters <a href="#pragma-line-1012" id="pragma-line-1012"></a>

***OfficeId***\
&#x20;The ID of the Office that contains the Action.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;The ID of the Application that contains the Action.\
&#x20;Type: Guid

***ClassId***\
&#x20;The ID of the Class that contains the Action.\
&#x20;Type: Guid

***ActionKey***\
&#x20;The Key of the Action.\
&#x20;Type: String

***ActionPropertyName***\
&#x20;The Name of the Property to get the value from.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1035" id="pragma-line-1035"></a>

Object

## GetApplicationIdByKey

Gets the Application ID installed in the Office identified by the Key.

#### Syntax <a href="#pragma-line-1044" id="pragma-line-1044"></a>

```
GetApplicationIdByKey ( [OfficeId] , Key )
```

#### Parameters <a href="#pragma-line-1050" id="pragma-line-1050"></a>

***OfficeId*** (optional)\
&#x20;The ID of the Office where the Application is installed.\
&#x20;Type: Guid

***Key***\
&#x20;The Key of the Application (or its Parent Application).\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1061" id="pragma-line-1061"></a>

Guid

## GetBosLoginValue

Gets the value of a Source Login identified by the Source Key and Key of the value.

#### Syntax <a href="#pragma-line-1070" id="pragma-line-1070"></a>

```
GetBosLoginValue ( BosKey , Key [, OfficeId] [, ApplicationId] )
```

#### Parameters <a href="#pragma-line-1076" id="pragma-line-1076"></a>

***BosKey***\
&#x20;The Key of the Source.\
&#x20;Type: String

***Key***\
&#x20;The Key of the Login value.\
&#x20;Type: String

***OfficeId*** (optional)\
&#x20;The ID of the Office for which the Login were created.\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;The ID of the Application for which the Login were created.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-1095" id="pragma-line-1095"></a>

Object

## GetClassFields

Returns fields of a class. Each field contains the following fields (which can be accessed through GetValue):

Id (Guid), Key (String), InternalKey (String), Name (String), Description (String), Info (String), DataType (String), ControlType (String), IsIdentity (Boolean), IsNullable (Boolean), IsReadOnly (Boolean), IsRequired (Boolean), Length (Integer), IsVirtual (Boolean), IsMultilanguage (Boolean), DataSourceClassId (Guid), DataSourceSelectionId (Guid), DataSourceFieldId (Guid), DataSourceNameFieldId (Guid), DataSourceOption (String).

#### Syntax

```
GetClassFields ( ClassID )
```

#### Parameters

**ClassId**\
&#x20;The class to get the fields from.\
&#x20;Type: Guid

#### Return type

Guid

## GetClassId

Gets the ID of a Class identified Key (Model Name).

#### Syntax <a href="#pragma-line-1104" id="pragma-line-1104"></a>

```
GetClassId ( OfficeId , ApplicationId , ModelName )
```

#### Parameters <a href="#pragma-line-1110" id="pragma-line-1110"></a>

***OfficeId***\
&#x20;This ID identifies the Workspace / Office which the instances are associated with.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;This ID identifies the Application which the instances are associated with.\
&#x20;Type: Guid

***ModelName***\
&#x20;The Key of the Class (Model Name).\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1125" id="pragma-line-1125"></a>

Guid

## GetClassValue

Gets a property value of a Class associated with a given Object.

#### Syntax <a href="#pragma-line-1134" id="pragma-line-1134"></a>

```
GetClassValue ( Object , ClassFieldName )
```

#### Parameters <a href="#pragma-line-1140" id="pragma-line-1140"></a>

***Object***\
&#x20;The Object with the associated Class.\
&#x20;Type: Object

***ClassFieldName***\
&#x20;The Name of the Property to get.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1151" id="pragma-line-1151"></a>

Object

## GetClassValue

Gets a property value of a Class identified by ID of the Class and name of the property.

#### Syntax <a href="#pragma-line-1160" id="pragma-line-1160"></a>

```
GetClassValue ( OfficeId , ApplicationId , ClassId , ClassFieldName )
```

#### Parameters <a href="#pragma-line-1166" id="pragma-line-1166"></a>

***OfficeId***\
&#x20;The ID of the Office that contains the Class.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;The ID of the Application that contains the Class.\
&#x20;Type: Guid

***ClassId***\
&#x20;The ID of the Class to get the value from.\
&#x20;Type: Guid

***ClassFieldName***\
&#x20;The Name of the Property to get.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1185" id="pragma-line-1185"></a>

Any

## GetCurrentInstance

Gets the Object of the current context (e.g. for Instance Workflow).

#### Syntax <a href="#pragma-line-1194" id="pragma-line-1194"></a>

```
GetCurrentInstance (  )
```

#### Parameters <a href="#pragma-line-1200" id="pragma-line-1200"></a>

No parameters

#### Return Type <a href="#pragma-line-1204" id="pragma-line-1204"></a>

Object

## GetCurrentInstances2

Gets the Objects of the current context. If the current list is filtered only filtered Objects are returned. If the current list is bulk editing mode only selected Objects are returned.

#### Syntax

```
GetCurrentInstances2 ( Pagination )
```

#### Parameters

**Pagination** \
&#x20;The pagination to use when getting the Objects.\
&#x20;Type: Pagination

#### Return Type

Page \<Object>

## GetCurrentUser

Returns the current user executing the script as an object.

#### Syntax <a href="#pragma-line-1232" id="pragma-line-1232"></a>

```
GetCurrentUser ( [OfficeId] )
```

#### Parameters <a href="#pragma-line-1238" id="pragma-line-1238"></a>

***OfficeId*** (optional)\
&#x20;This ID identifies the Workspace / Office which the user is working on when the code is executed.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-1245" id="pragma-line-1245"></a>

Object

## GetCurrentUserLanguage

Returns the language of the current user executing the script.

#### Syntax <a href="#pragma-line-1572" id="pragma-line-1572"></a>

```
GetCurrentUserLanguage ( [OfficeId] )
```

#### Parameters <a href="#pragma-line-1578" id="pragma-line-1578"></a>

***OfficeId*** (optional)\
This ID identifies the Workspace / Office which the user is working on when the code is executed.\
\&#xNAN;*Type: Guid*

#### Return Type <a href="#pragma-line-1585" id="pragma-line-1585"></a>

Language

## GetDocument

Gets the Document from a given Object.

#### Syntax <a href="#pragma-line-1254" id="pragma-line-1254"></a>

```
GetDocument ( Object )
```

#### Parameters <a href="#pragma-line-1260" id="pragma-line-1260"></a>

***Object***\
&#x20;The Object to get Document from.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-1267" id="pragma-line-1267"></a>

Document

## GetDocumentAsBase64String

Gets the content of a document and returns Base64 encoded String

#### Syntax

```
GetDocumentAsBase64String ( Document )
```

#### Parameters

**Document**\
&#x20;The Document to get the content from.\
&#x20;Type: Document

#### Return Type

String

## GetDocumentAsString

Gets the Document XML content as a String.

#### Syntax <a href="#pragma-line-1276" id="pragma-line-1276"></a>

```
GetDocumentAsString ( Document , EncodingCodePage )
```

#### Parameters <a href="#pragma-line-1282" id="pragma-line-1282"></a>

**Document**\
&#x20;The Document to get the content from.\
&#x20;Type: Document

**EncodingCodePage**\
&#x20;The Encoding of the Document.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-1293" id="pragma-line-1293"></a>

String

## GetDocumentText

Gets the text of a Word or PDF document.

#### Syntax <a href="#pragma-line-1276" id="pragma-line-1276"></a>

```
GetDocumentText ( Document [, Format] )
```

#### Parameters <a href="#pragma-line-1282" id="pragma-line-1282"></a>

***Document***\
&#x20;The Document to get the text from.\
&#x20;Type: Document

**Format as String (optional):**\
&#x20;The format of the document: Doc, Docx, Pdf. Analyses the given document if format is omitted.

#### Return Type <a href="#pragma-line-1293" id="pragma-line-1293"></a>

String

## GetDocumentDates

Gets the creation and modification dates of a document. The dates are retrieved from the document-specific metadata (not through filesystem-specific metadata).

#### Syntax

```
GetDocumentDates ( Source [, SourceFormat] )
```

#### Parameters

**Source**\
&#x20;The source document to get the dates from..\
&#x20;Type: Document

***SourceFormat*** (optional)\
&#x20;The source format of the document. Analyses the given document if format is omitted.\
&#x20;Type: String

#### Return type

Dictionary\<String,DateTime>

## GetDocumentText

Gets the text of a Word or PDF document.

#### Syntax

```
GetDocumentText ( Document [, Format ] )
```

#### Parameters

**Document**\
&#x20;The Document to get the content from.\
&#x20;Type: Document

***Format*** (optional)\
&#x20;The format of the document. Analyses the given document, if format is omitted.\
&#x20;Type: String

#### Return type

String

## GetDocumentValue

Gets a Document property value from a given Document.

#### Syntax <a href="#pragma-line-1302" id="pragma-line-1302"></a>

```
GetDocumentValue ( Document , PropertyName )
```

#### Parameters <a href="#pragma-line-1308" id="pragma-line-1308"></a>

***Document***\
&#x20;The Document to get the property value from.\
&#x20;Type: Document

***PropertyName***\
&#x20;The Name of the Property value to get.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1319" id="pragma-line-1319"></a>

Object

## GetDocumentAsByteArray

Gets the Document content as a ByteArray.

#### Syntax

```
ByteArray GetDocumentAsByteArray( Document Document )
```

#### Parameters

***Document*** \
The Document to get the content from. \
Type: Document

#### Return Type

ByteArray

## GetEntry

Takes a Dictionary and returns the value identified by a specified Key or NULL if no value exists.

#### Syntax <a href="#pragma-line-1328" id="pragma-line-1328"></a>

```
GetEntry ( Dictionary , Key )
```

#### Parameters <a href="#pragma-line-1334" id="pragma-line-1334"></a>

***Dictionary***\
&#x20;The dictionary of which the entry is read.\
&#x20;Type: Dictionary\<Any,Any>

***Key***\
&#x20;The name of the field.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-1345" id="pragma-line-1345"></a>

Any

## GetFieldName

Gets field key by fieldId and classId from list of classIds, forInstance (without ModelName) and forValue (without \_\_RESOLVED).

#### Syntax <a href="#pragma-line-1354" id="pragma-line-1354"></a>

```
GetFieldName ( FieldId , ClassIdList [, OfficeId] [, ApplicationId] [, ForInstance] [, ForValue] )
```

#### Parameters <a href="#pragma-line-1360" id="pragma-line-1360"></a>

***FieldId***\
&#x20;The ID of the Field to get the Name from.\
&#x20;Type: Guid

***ClassIdList***\
&#x20;A list of Class IDs with the Field.\
&#x20;Type: List\<Guid>

***OfficeId*** (optional)\
&#x20;The ID of the Office that contains the Field.\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;The ID of the Application that contains the Field.\
&#x20;Type: Guid

***ForInstance*** (optional)\
&#x20;When value True is, should be got FieldName without ModelName.\
&#x20;Type: Boolean

***ForValue*** (optional)\
&#x20;When 'ForValue' true is, should be got value without \_\_RESOLVED construct.\
&#x20;Type: Boolean

#### Return Type <a href="#pragma-line-1387" id="pragma-line-1387"></a>

String

## GetFieldNames

Gets a list of Field Names associated with a given Object.

#### Syntax <a href="#pragma-line-1396" id="pragma-line-1396"></a>

```
GetFieldNames ( Object )
```

#### Parameters <a href="#pragma-line-1402" id="pragma-line-1402"></a>

***Object***\
&#x20;The Object to get the Field Names from.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-1409" id="pragma-line-1409"></a>

List\<String>

## GetFieldValue

Gets the property value of a Field.

#### Syntax <a href="#pragma-line-1418" id="pragma-line-1418"></a>

```
GetFieldValue ( OfficeId , ApplicationId , ClassId , FieldName , PropertyName )
```

#### Parameters <a href="#pragma-line-1424" id="pragma-line-1424"></a>

***OfficeId***\
&#x20;The ID of the Office that contains the Field.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;The ID of the Application that contains the Field.\
&#x20;Type: Guid

***ClassId***\
&#x20;The ID of the Class that contains the Field.\
&#x20;Type: Guid

***FieldName***\
&#x20;The Key of the Field to get the property value from.\
&#x20;Type: String

***PropertyName***\
&#x20;The Name of the Property\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1447" id="pragma-line-1447"></a>

Any

## GetGroupRoles

Returns roles for a group. Each role contains the 'Id' and 'Name' (which can be accessed through GetValue).

```
List<Object> GetGroupRoles(Guid GroupId)
```

**Parameters**

* **GroupId**\
  The group to filter the roles.\
  Type: Guid

**Return Type**

List\<Object>

## GetGroupUsers

Returns users for a group. Each user contains the 'Id' and 'Name' (which can be accessed through GetValue).

```
List<Object> GetGroupUsers(Guid GroupId)
```

**Parameters**

* **GroupId**\
  The group to filter the users.\
  Type: Guid

**Return Type**

List\<Object>

## GetHtml

Gets the content of a given Document as HTML.

#### Syntax <a href="#pragma-line-1456" id="pragma-line-1456"></a>

```
GetHtml ( Document )
```

#### Parameters <a href="#pragma-line-1462" id="pragma-line-1462"></a>

***Document***\
&#x20;The Document to get the HTML from.\
&#x20;Type: Document

#### Return Type <a href="#pragma-line-1469" id="pragma-line-1469"></a>

String

## GetInstance

Takes OfficeId, ApplicationId, ClassId, InstanceId and LinkPath as input and returns the object identified by the InstanceId.

#### Syntax <a href="#pragma-line-1478" id="pragma-line-1478"></a>

```
GetInstance ( OfficeId , ApplicationId , ClassId [, LinkPath] , InstanceId )
```

#### Parameters <a href="#pragma-line-1484" id="pragma-line-1484"></a>

***OfficeId***\
&#x20;This ID identifies the Workspace / Office which the instance is associated with.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;This ID identifies the Application which the instance is associated with.\
&#x20;Type: Guid

***ClassId***\
&#x20;This ID identifies the Class of the instance.\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;Navigation path to the object.\
&#x20;Type: LinkPath

***InstanceId***\
&#x20;The ID of the specific instance.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-1507" id="pragma-line-1507"></a>

Object

## GetInstances

Takes OfficeId, ApplicationId, ClassId and LinkPath as input and returns a list of Objects of the given class.

#### Syntax <a href="#pragma-line-1516" id="pragma-line-1516"></a>

```
GetInstances ( OfficeId , ApplicationId , ClassId [, LinkPath] )
```

#### Parameters <a href="#pragma-line-1522" id="pragma-line-1522"></a>

***OfficeId***\
&#x20;This ID identifies the Workspace / Office which the instances are associated with.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;This ID identifies the Application which the instances are associated with.\
&#x20;Type: Guid

***ClassId***\
&#x20;This ID identifies the Class of the instances.\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;Navigation path to the object.\
&#x20;Type: LinkPath

#### Return Type <a href="#pragma-line-1541" id="pragma-line-1541"></a>

List\<Object>

## GetKeys

Gets the Keys of a given Dictionary.

#### Syntax <a href="#pragma-line-1550" id="pragma-line-1550"></a>

```
GetKeys ( Dictionary )
```

#### Parameters <a href="#pragma-line-1556" id="pragma-line-1556"></a>

***Dictionary***\
&#x20;The Dictionary to get the Keys from.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-1563" id="pragma-line-1563"></a>

List\<Any>

## GetLanguage

Takes an ID of a language as input and returns the language of that specific instance.

#### Syntax <a href="#pragma-line-1572" id="pragma-line-1572"></a>

```
GetLanguage ( InstanceId )
```

#### Parameters <a href="#pragma-line-1578" id="pragma-line-1578"></a>

***InstanceId***\
&#x20;The ID of the language to get (e. g. LanguageId field of user instance).\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-1585" id="pragma-line-1585"></a>

Language

## GetLinkedInstances

Takes an Object and a LinkId as input and returns a list of all Objects which are linked to that instance. In case of a N:M relation, the function can return the lookup table or the target class. If "target=false" the N:M class is returned. If "target=true", the target class is returned.

#### Syntax <a href="#pragma-line-1594" id="pragma-line-1594"></a>

```
GetLinkedInstances ( Object , LinkId [, Target] )
```

#### Parameters <a href="#pragma-line-1600" id="pragma-line-1600"></a>

***Object***\
&#x20;The object for which the linked instances will be loaded.\
&#x20;Type: Object

***LinkId***\
&#x20;The ID of the Link which has been specified in the Class Designer.\
&#x20;Type: Guid

***Target*** (optional)\
&#x20;In case of a N:M relation, the function can return the lookup table or the target class. If target=false the N:M class is returned. If target=true, the target class is returned.\
&#x20;Type: Boolean

#### Return Type <a href="#pragma-line-1615" id="pragma-line-1615"></a>

List\<Object>

## GetLinkId

Gets the ID of a Link between a given Object and a target Class identified by a Name.

#### Syntax <a href="#pragma-line-1624" id="pragma-line-1624"></a>

```
GetLinkId ( Object , ClassName , Direction [, NmClassName] )
```

#### Parameters <a href="#pragma-line-1630" id="pragma-line-1630"></a>

***Object***\
&#x20;The source Object of the Link.\
&#x20;Type: Object

***ClassName***\
&#x20;The Name of the target Class of the Link.\
&#x20;Type: String

***Direction***\
&#x20;The Direction of the Link ('None', 'Parents', 'Children').\
&#x20;Type: String

***NmClassName*** (optional)\
&#x20;The Name of the NM Class of the Link.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1649" id="pragma-line-1649"></a>

Guid

## GetLinkPath

Gets the Link Path of a given Object.

#### Syntax <a href="#pragma-line-1658" id="pragma-line-1658"></a>

```
GetLinkPath ( Object )
```

#### Parameters <a href="#pragma-line-1664" id="pragma-line-1664"></a>

***Object***\
&#x20;The Object to get the Link Path from.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-1671" id="pragma-line-1671"></a>

LinkPath

## GetMainInstance

Gets the Main Instance by using a given Link Path.

#### Syntax <a href="#pragma-line-1680" id="pragma-line-1680"></a>

```
GetMainInstance ( OfficeId , ApplicationId , LinkPath )
```

#### Parameters <a href="#pragma-line-1686" id="pragma-line-1686"></a>

***OfficeId***\
&#x20;The ID of the Office of the the Main Instance.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;The ID of the Application of the Main Instance.\
&#x20;Type: Guid

***LinkPath***\
&#x20;The Link Path to use to get the Main Instance.\
&#x20;Type: LinkPath

#### Return Type <a href="#pragma-line-1701" id="pragma-line-1701"></a>

Object

## GetOfficeGroups

Returns groups for an office. Each group contains the 'Id' and 'Name' (which can be accessed through GetValue).

#### Syntax

```
GetOfficeGroups(
     [OfficeId]
)
```

#### Parameters

***OfficeId** (optional)*\
The office to filter the groups (the current office if left empty).\
Type: Guid

#### Return Type

List\<Object>

## GetOfficeLicenses

Returns licenses an office has access to.&#x20;

#### Syntax

```
GetOfficeLicenses( [OfficeId] )
```

#### Parameters

***OfficeId*** (optional)\
&#x20;The office to filter the users (the current office if left empty).\
&#x20;Type: Guid

#### Return Type

List\<Object>

## GetOfficeUsers

Returns users for an office. Each user contains the 'Id' and 'Name' (which can be accessed through GetValue).

#### Syntax <a href="#pragma-line-1710" id="pragma-line-1710"></a>

```
GetOfficeUsers ( [OfficeId] )
```

#### Parameters <a href="#pragma-line-1716" id="pragma-line-1716"></a>

***OfficeId*** (optional)\
&#x20;The office to filter the users (the current office if left empty).\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-1723" id="pragma-line-1723"></a>

List\<Object>

## GetOldInstance

Gets the old Object available in a triggered Workflow (Delete or Update).

#### Syntax <a href="#pragma-line-1732" id="pragma-line-1732"></a>

```
GetOldInstance (  )
```

#### Parameters <a href="#pragma-line-1738" id="pragma-line-1738"></a>

No parameters

#### Return Type <a href="#pragma-line-1742" id="pragma-line-1742"></a>

Object

## GetRoleChildRoles

Returns child roles for a role. Each role contains the 'Id' and 'Name' (which can be accessed through GetValue).

#### Syntax

```
List<Object> GetRoleChildRoles(
    Guid RoleId,
    Guid [ApplicationId]
)
```

#### **Parameters**

***RoleId***\
The role to filter the roles.\
Type: Guid

***ApplicationId** (optional)*\
The application to filter the roles (current app if left empty).\
Type: Guid

#### Return Type

List\<Object>

## GetRoleParentRoles

Returns parent roles for a role. Each role contains the 'Id' and 'Name' (which can be accessed through GetValue).

#### Syntax

```
List<Object> GetRoleParentRoles(
    Guid RoleId,
    Guid [ApplicationId]
)
```

#### Parameters

***RoleId***\
The role to filter the roles.\
Type: Guid

***ApplicationId** (optional)*\
The application to filter the roles (current app if left empty).\
Type: Guid

#### Return Type

List\<Object>

## GetRoleUsers

Returns users for a role. Each user contains the 'Id' and 'Name' (which can be accessed through GetValue).

#### Syntax

```
List<Object> GetRoleUsers(
    Guid RoleId,
    Guid [AppId]
)
```

#### Parameters

***RoleId***\
The role to filter the users.\
Type: Guid

***AppId** (optional)*\
The app to filter the users (current app if left empty).\
Type: Guid

#### Return Type

List\<Object>

## GetTargetClassId

Gets the ID of the target Class of a Link.

#### Syntax <a href="#pragma-line-1751" id="pragma-line-1751"></a>

```
GetTargetClassId ( Object , LinkId [, Target] )
```

#### Parameters <a href="#pragma-line-1757" id="pragma-line-1757"></a>

***Object***\
&#x20;The source Object of the Link.\
&#x20;Type: Object

***LinkId***\
&#x20;The ID of the Link to get the target Class from.\
&#x20;Type: Guid

***Target*** (optional)\
&#x20;Defines whether to get the Target or the NM Class (if a NM Link has been chosen).\
&#x20;Type: Boolean

#### Return Type <a href="#pragma-line-1772" id="pragma-line-1772"></a>

Guid

## GetTemplates

Returns all Templates of the Office and Application (each instances has a Id, Key, Name, ClassId and Type).

#### Syntax <a href="#pragma-line-1781" id="pragma-line-1781"></a>

```
GetTemplates ( [OfficeId] [, ApplicationId] )
```

#### Parameters <a href="#pragma-line-1787" id="pragma-line-1787"></a>

***OfficeId*** (optional)\
&#x20;This ID identifies the Workspace / Office which the templates are associated with.\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;This ID identifies the Application which the templates are associated with.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-1798" id="pragma-line-1798"></a>

List\<Object>

## GetTemplatesByClassId

Returns all Templates of the Office and Application (each instances has a Id, Key, Name, ClassId and Type) executable for a Class.

#### Syntax <a href="#pragma-line-1807" id="pragma-line-1807"></a>

```
GetTemplatesByClassId ( [OfficeId] [, ApplicationId] , ClassId )
```

#### Parameters <a href="#pragma-line-1813" id="pragma-line-1813"></a>

***OfficeId*** (optional)\
&#x20;This ID identifies the Workspace / Office which the templates are associated with.\
&#x20;Type: Guid

***ApplicationId*** (optional)\
&#x20;This ID identifies the Application which the templates are associated with.\
&#x20;Type: Guid

***ClassId***\
&#x20;This ID identifies the Class for which the Templates must be executable (includes abstract Classes).\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-1828" id="pragma-line-1828"></a>

List\<Object>

## GetUser

Takes an OfficeId, and an InstanceId as input and returns the corresponding user object.

#### Syntax <a href="#pragma-line-1837" id="pragma-line-1837"></a>

```
GetUser ( OfficeId , InstanceId )
```

#### Parameters <a href="#pragma-line-1843" id="pragma-line-1843"></a>

**OfficeId**\
&#x20;The ID of the office the user is associated with.\
&#x20;Type: Guid

**InstanceId**\
&#x20;This ID which identifies the user.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-1854" id="pragma-line-1854"></a>

Object

## GetUser2

Takes an OfficeId, and an propertyName, and value as input and returns the corresponding user object.

#### Syntax <a href="#pragma-line-1863" id="pragma-line-1863"></a>

```
GetUser2 ( OfficeId , PropertyName , Value )
```

#### Parameters <a href="#pragma-line-1869" id="pragma-line-1869"></a>

**OfficeId**\
&#x20;The ID of the Office to get the User from.\
&#x20;Type: Guid

**PropertyName**\
&#x20;The Property Name to identify the User.\
&#x20;Type: String

**Value**\
&#x20;The Value to identify the User.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1884" id="pragma-line-1884"></a>

Object

## GetUserFeatures

Returns features a user has access to. Each feature contains the 'Id' and 'Name' (which can be accessed through [GetValue](#getvalue)).

#### Syntax

```
List<Object> GetUserFeatures(
    Guid [UserId],
    Guid [OfficeId]
)
```

#### Parameters

***UserId** (optional)*\
The user to filter the features (the current user if left empty).\
Type: Guid

***OfficeId** (optional)*\
The office to filter the features (the current office if left empty).\
Type: Guid

#### Return type

List\<Object>

## GetUserGroups

Returns groups for an user. Each group contains the 'Id' and 'Name' (which can be accessed through GetValue).

#### Syntax

```
List<Object> GetUserGroups(
    Guid [UserId],
    Guid [OfficeId]
)
```

#### Parameters

***UserId** (optional)*\
The user to filter the groups (the current user if left empty).\
Type: Guid

***OfficeId** (optional)*\
The office to filter the groups (the current office if left empty).\
Type: Guid

#### Return Type

List\<Object>

## GetUserRoles

Returns roles for an user. Each role contains the 'Id' and 'Name' (which can be accessed through GetValue).

#### Syntax

```
List<Object> GetUserRoles(
    Guid [UserId],
    Guid [AppId]
)
```

**Parameters**

***UserId** (optional)*\
The user to filter the roles (the current user if left empty).\
Type: Guid

***AppId** (optional)*\
The app to filter the roles (the current app if left empty).\
Type: Guid

**Return Type**

List\<Object>

## GetValue

Return the value of the given Field of an Object.

#### Syntax <a href="#pragma-line-1893" id="pragma-line-1893"></a>

```
GetValue ( Object , Field )
```

#### Parameters <a href="#pragma-line-1899" id="pragma-line-1899"></a>

***Object***\
&#x20;The object which contains the value.\
&#x20;Type: Object

***Field***\
&#x20;The name of the field which identifies the value.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1910" id="pragma-line-1910"></a>

Any

## GetValues

Returns the values of the given fields of an object separated by a given String.

#### Syntax <a href="#pragma-line-1919" id="pragma-line-1919"></a>

```
GetValues ( Object , FieldNameList , Separator )
```

#### Parameters <a href="#pragma-line-1925" id="pragma-line-1925"></a>

***Object***\
&#x20;The Object to get the Field Values from.\
&#x20;Type: Object

***FieldNameList***\
&#x20;A list of Field Names to get the values from.\
&#x20;Type: List\<String>

***Separator***\
&#x20;The Separator of the values.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1940" id="pragma-line-1940"></a>

List\<String>

## HasEntry

Checks whether the given Dictionary has an entry identified by a key.

#### Syntax

```
HasEntry ( Dictionary<Any,Any> , Key )
```

#### Parameters

**Dictionary**\
&#x20;The dictionary to check whether an entry identified by a key exists.\
&#x20;Type: Dictionary\<Any,Any>

**Key**\
&#x20;The key to identify the entry.\
&#x20;Type: Any

#### Return Type

Boolean

## IdentityTable

Increases an Identity value and returns the result.

#### Syntax <a href="#pragma-line-1949" id="pragma-line-1949"></a>

```
IdentityTable ( OfficeId , ApplicationId [, LinkPath] , SelectionId [, Parameters] , Field )
```

#### Parameters <a href="#pragma-line-1955" id="pragma-line-1955"></a>

***OfficeId***\
&#x20;The ID of the Office where the Identity Table can be accessed.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;The ID of the Application where the Identity Table can be accessed.\
&#x20;Type: Guid

***LinkPath*** (optional)\
&#x20;Navigation path to the object. Optional and can be null.\
&#x20;Type: LinkPath

***SelectionId***\
&#x20;The ID of the Selection which is used to get an Identity Object.\
&#x20;Type: Guid

***Parameters*** (optional)\
&#x20;The Parameters of the Selection.\
&#x20;Type: Dictionary\<Any,Any>

***Field***\
&#x20;The Key of the Field where the Identity value is stored.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-1982" id="pragma-line-1982"></a>

Int

## Input

Represents a request for input.

#### Syntax <a href="#pragma-line-1991" id="pragma-line-1991"></a>

```
Input ( Name , Order , Key , Description , DataType , DefaultValue [, DataSourceClassId] [, DataSourceController] , DataSourceOption [, DataSourceFieldId] , ControlType [, Length] )
```

#### Parameters <a href="#pragma-line-1997" id="pragma-line-1997"></a>

***Name***\
&#x20;Name which will be displayed.\
&#x20;Type: String

***Order***\
&#x20;Order Element\
&#x20;Type: Int

***Key***\
&#x20;The key which is used as internal reference.\
&#x20;Type: String

***Description***\
&#x20;Description of the Input.\
&#x20;Type: String

***DataType***\
&#x20;The Data type of the Input\
&#x20;Type: String

***DefaultValue***\
&#x20;Default\
&#x20;Type: String

***DataSourceClassId*** (optional)\
&#x20;Specifies the class of the input.\
&#x20;Type: Guid

***DataSourceController*** (optional)\
&#x20;Specifies the controller of the input.\
&#x20;Type: Guid

***DataSourceOption***\
&#x20;Represent predefined choices.\
&#x20;Type: String

***DataSourceFieldId*** (optional)\
&#x20;The ID of the Field for the a Data Source (must be set with DataSourceClassId).\
&#x20;Type: Guid

***ControlType***\
&#x20;The Type of the Control to display to get the Input.\
&#x20;Type: String

***Length*** (optional)\
&#x20;The maximum Length of the Input.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-2048" id="pragma-line-2048"></a>

Exit

## Inputs

Represents a request for multiple inputs.

#### Syntax <a href="#pragma-line-2057" id="pragma-line-2057"></a>

```
Inputs ( [Name] [, Description] , Parameters [, Validate] )
```

#### Parameters <a href="#pragma-line-2063" id="pragma-line-2063"></a>

***Name*** (optional)\
&#x20;The Name of the Input request (will be displayed to the User).\
&#x20;Type: String

***Description*** (optional)\
&#x20;The Description of the Input request (will be displayed to the User).\
&#x20;Type: String

**Parameters**\
&#x20;The Parameters to request.\
&#x20;Type: List\<Parameter>

***Validate*** (optional)\
A validation callback that validates the given input. \
Type: Dictionary\<String,String>

#### Return Type <a href="#pragma-line-2078" id="pragma-line-2078"></a>

Exit

## Layout

Represents a Field for a Selection.

#### Syntax <a href="#pragma-line-2087" id="pragma-line-2087"></a>

```
Layout ( FieldId , SortType [, Title] )
```

#### Parameters <a href="#pragma-line-2093" id="pragma-line-2093"></a>

***FieldId***\
&#x20;The ID of the Field.\
&#x20;Type: Guid

***SortType***\
&#x20;The sorting direction for the Field ('None', 'Ascending', 'Descending').\
&#x20;Type: String

***Title*** (optional)\
&#x20;The alias used for the Field.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-2108" id="pragma-line-2108"></a>

Layout

## LinkInstances

Link a main-instance (target) to another main-instance (source). The created link not saved! Make sure to execute save on source instance.

#### Syntax <a href="#pragma-line-2117" id="pragma-line-2117"></a>

```
LinkInstances ( SourceInstance , TargetInstance , LinkServiceType )
```

#### Parameters <a href="#pragma-line-2123" id="pragma-line-2123"></a>

***SourceInstance***\
&#x20;the source instance\
&#x20;Type: Object

***TargetInstance***\
&#x20;the target instance\
&#x20;Type: Object

***LinkServiceType***\
&#x20;type of the link\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-2138" id="pragma-line-2138"></a>

Any

## List

Creates an empty list.

#### Syntax <a href="#pragma-line-2147" id="pragma-line-2147"></a>

```
List ( [Items] )
```

#### Parameters <a href="#pragma-line-2153" id="pragma-line-2153"></a>

***Items*** (optional)\
&#x20;The initial Items for the list.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2160" id="pragma-line-2160"></a>

List\<Any>

## LoadNew

Loads a given Object new.

#### Syntax <a href="#pragma-line-2169" id="pragma-line-2169"></a>

```
LoadNew ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-2175" id="pragma-line-2175"></a>

***Object***\
&#x20;The Object to load new.\
&#x20;Type: Any

***LayoutId*** (optional)\
&#x20;The ID of the Layout for the newly loaded Object.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-2186" id="pragma-line-2186"></a>

Exit

## Message

Displays a Message to the User.

#### Syntax <a href="#pragma-line-2195" id="pragma-line-2195"></a>

```
Message ( Message )
```

#### Parameters <a href="#pragma-line-2201" id="pragma-line-2201"></a>

***Message***\
&#x20;The Message to display.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-2208" id="pragma-line-2208"></a>

Exit

## MultiSelectDefaultValue

Builds the MultiSelect default value. This should be used with the DefaultValue of a Parameter.

#### Syntax

```
MultiSelectDefaultValue (Values)
```

#### Parameters

**Values**\
&#x20;The values to use as a default value.\
&#x20;Type: List\<Any>

#### Return type

String

## MultiSelectOptions

Builds the MultiSelect options. This should be used with the Options of a Parameter.

#### Syntax

```
MultiSelectOptions ( [Columns] [, UseDropdownAfter] )
```

#### Parameters

***Columns*** (optional)\
&#x20;The Columns count for the MultiSelect Input.\
&#x20;Type: Int

***UseDropdownAfter*** (optional)\
&#x20;If the number of items within a column is greater than the provided value, the control will be displayed as a dropdown. If not provided, the control will never display as a dropdown.\
Type: Int

#### Return type

Options

## ObjectDefaultValue

Builds the Object default value. This should be used with the DefaultValue of a Parameter.

#### Syntax <a href="#pragma-line-2195" id="pragma-line-2195"></a>

```
String ObjectDefaultValue( 
    Dictionary<String,Any> Object 
)
```

#### Parameters <a href="#pragma-line-2201" id="pragma-line-2201"></a>

***Object***\
&#x20;The object data to use as a default value.\
&#x20;*Type: Dictionary\<String,Any>*

**Return Type**\
String

## ObjectOptions

Builds the Object options. This should be used with the Options of a Parameter.

#### Syntax <a href="#pragma-line-2195" id="pragma-line-2195"></a>

```
Options ObjectOptions(
    List<Parameter> Fields
)
```

#### Parameters <a href="#pragma-line-2201" id="pragma-line-2201"></a>

***Fields***\
&#x20;The fields configuration to edit the object.\
&#x20;*Type: List\<Parameter>*

**Return Type**\
Options

## Open

Opens a given Object.

#### Syntax <a href="#pragma-line-2217" id="pragma-line-2217"></a>

```
Open ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-2223" id="pragma-line-2223"></a>

***Object***\
&#x20;The Object to open.\
&#x20;Type: Object

***LayoutId*** (optional)\
&#x20;The ID of the Layout to open the Object with.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-2234" id="pragma-line-2234"></a>

Exit

## PackZip

Packs Documents in a ZIP archive and returns the result as a Document.

#### Syntax <a href="#pragma-line-2243" id="pragma-line-2243"></a>

```
PackZip ( Name , Entries )
```

#### Parameters <a href="#pragma-line-2249" id="pragma-line-2249"></a>

***Name***\
&#x20;The Name of the archive.\
&#x20;Type: String

***Entries***\
&#x20;The Documents to zip; a Dictionary where the Key is the path in the archive.\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-2260" id="pragma-line-2260"></a>

Document

## Pagination

Represents a pagination to use when getting Objects.

#### Syntax

```
Pagination ( Take )
```

#### Parameters

**Take**\
&#x20;The amount of Objects to take.\
&#x20;Type: Int

#### Return Type

Pagination

## Parameter

Represents a Parameter to request as an Input (used with Inputs).

#### Syntax <a href="#pragma-line-2269" id="pragma-line-2269"></a>

```
Parameter ( Key , DataType , Name [, Description] [, IsRequired] [, DefaultValue] [, DataSourceClassId] [, DataSourceFieldId] [, DataSourceControllerId] [, DataSourceOption] [, DataSourceSelectionId] [, DataSourceSelectionKeyFieldId] [, DataSourceSelectionNameFieldId] [, DataSourceSelectionParameters]  [, ControlType] [, Length] [, Options]  )
```

#### Parameters <a href="#pragma-line-2275" id="pragma-line-2275"></a>

**Key**\
&#x20;The Key of the Input (identifies the value after the request).\
&#x20;Type: String

**DataType**\
&#x20;The Type of the Data to request.\
&#x20;Type: String

**Name**\
&#x20;The Name of the Input to display.\
&#x20;Type: String

***Description*** (optional)\
&#x20;The Description of the Input to display.\
&#x20;Type: String

***IsRequired*** (optional)\
&#x20;Defines whether the User has to Input a value.\
&#x20;Type: Boolean

***DefaultValue*** (optional)\
&#x20;The Default Value of the Input.\
&#x20;Type: String

***DataSourceClassId*** (optional)\
&#x20;The ID of the Class to choose a value from.\
&#x20;Type: Guid

***DataSourceFieldId*** (optional)\
&#x20;The ID of the Field to choose a value from (in combination with DataSourceClassId).\
&#x20;Type: Guid

***DataSourceControllerId*** (optional)\
&#x20;The ID of the Controller used to choose a value from.\
&#x20;Type: Guid

***DataSourceOption*** (optional)\
&#x20;A String representation of a list to choose a value from.\
&#x20;Type: String

***DataSourceSelectionId*** (optional)\
The ID of the Selection used to choose a value from.\
Type: Guid

***DataSourceSelectionKeyFieldId*** (optional)\
The ID of the field to identify a value (in combination with DataSourceSelectionId).\
Type: Guid

***DataSourceSelectionNameFieldId*** (optional)\
The ID of the field to display a value (in combination with DataSourceSelectionId).\
Type: Guid

***DataSourceSelectionParameters*** (optional)\
The parameters to use for the Selection as default values.\
Type: Dictionary\<String,Any>

***ControlType*** (optional)\
The Type of Control to display (TextBox, ComboBox, Label, EditComboBox, AddComboBox, MultiSelect, CheckBox, Calendar, DatePicker, TimePicker, Password, TextArea, Email, Phone, Adress, Slider, Upload, UploadMultiple, Url, HtmlEditor, MarkdownEditor, Table, Object).\
&#x20;Type: String

***Length*** (optional)\
&#x20;The maximum Length of the Input.\
&#x20;Type: Int

***Options*** (optional)\
&#x20;Additional configuration for this parameter\
&#x20;Type: Options

#### Return Type <a href="#pragma-line-2326" id="pragma-line-2326"></a>

Parameter

## Parameter2

Represents a Parameter to request as an Input with dynamic keys (used with Inputs).

#### Syntax

```
Parameter Parameter2(
    String Key,
    String DataType,
    String Name,
    String [Description],
    Boolean [IsRequired],
    String [DefaultValue],
    Guid [DataSourceClassId],
    Guid [DataSourceFieldId],
    Guid [DataSourceControllerId],
    String [DataSourceOption],
    Guid [DataSourceSelectionId],
    Guid [DataSourceSelectionKeyFieldId],
    Guid [DataSourceSelectionNameFieldId],
    Dictionary<String,Any> [DataSourceSelectionParameters],
    String [ControlType],
    Int [Length],
    Options [Options]
)
```

**Parameters**

**Key** \
The Key of the Input (identifies the value after the request). \
\&#xNAN;*Type: String*

**DataType**\
The Type of the Data to request (String, Boolean, File, Integer, DateTime, Date, Time).\
\&#xNAN;*Type: String*

**Name**\
The Name of the Input to display.\
\&#xNAN;*Type: String*

***Description*** (optional)\
The Description of the Input to display.\
\&#xNAN;*Type: String*

***IsRequired*** (optional)\
Defines whether the User has to Input a value.\
\&#xNAN;*Type: Boolean*

***DefaultValue*** (optional)\
The Default Value of the Input.\
\&#xNAN;*Type: String*

***DataSourceClassId*** (optional)\
The ID of the Class to choose a value from.\
\&#xNAN;*Type: Guid*

***DataSourceFieldId*** (optional)\
The ID of the Field to choose a value from (in combination with DataSourceClassId).\
\&#xNAN;*Type: Guid*

***DataSourceControllerId*** (optional)\
The ID of the Controller used to choose a value from.\
\&#xNAN;*Type: Guid*

***DataSourceOption*** (optional)\
A String representation of a list to choose a value from.\
\&#xNAN;*Type: String*

***DataSourceSelectionId*** (optional)\
The ID of the Selection used to choose a value from.\
Type: Guid

***DataSourceSelectionKeyFieldId*** (optional)\
The ID of the field to identify a value (in combination with DataSourceSelectionId).\
Type: Guid

***DataSourceSelectionNameFieldId*** (optional)\
The ID of the field to display a value (in combination with DataSourceSelectionId).\
Type: Guid

***DataSourceSelectionParameters*** (optional)\
The parameters to use for the Selection as default values.\
Type: Dictionary\<String,Any>

***ControlType*** (optional)\
The Type of Control to display (TextBox, ComboBox, Label, EditComboBox, AddComboBox, MultiSelect, CheckBox, Calendar, DatePicker, TimePicker, Password, TextArea, Table, Email, Phone, Adress, Slider, Upload, UploadMultiple, Url, HtmlEditor, MarkdownEditor, Object).\
\&#xNAN;*Type: String*

***Length*** (optional)\
The maximum Length of the Input.\
\&#xNAN;*Type: Int*

***Options** (optional)*\
Additional configuration for this parameter\
\&#xNAN;*Type: Options*

**Return Type**

Parameter

## ReduceLinkPath

Reduces the LinkPath by one step.

#### Syntax <a href="#pragma-line-2335" id="pragma-line-2335"></a>

```
ReduceLinkPath ( LinkPath )
```

#### Parameters <a href="#pragma-line-2341" id="pragma-line-2341"></a>

***LinkPath***\
&#x20;The link which is to be reduced.\
&#x20;Type: LinkPath

#### Return Type <a href="#pragma-line-2348" id="pragma-line-2348"></a>

LinkPath

## Refresh

Refreshes a given Object.

#### Syntax <a href="#pragma-line-2357" id="pragma-line-2357"></a>

```
Refresh ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-2363" id="pragma-line-2363"></a>

***Object***\
&#x20;The Object to refresh.\
&#x20;Type: Object

***LayoutId*** (optional)\
&#x20;The ID of the Layout to refresh the Object with.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-2374" id="pragma-line-2374"></a>

Exit

## Reload

Reloads a given Object

#### Syntax <a href="#pragma-line-2383" id="pragma-line-2383"></a>

```
Reload ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-2389" id="pragma-line-2389"></a>

***Object***\
&#x20;The Object to reload.\
&#x20;Type: Object

***LayoutId*** (optional)\
&#x20;The ID of the Layout to reload the Object with.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-2400" id="pragma-line-2400"></a>

Exit

## RemoveUserFromLicense

Removes a user from a license or license item. Throws an error if the license or license item does not support user assignments.

#### Syntax

```
RemoveUserFromLicense ( LicenseId  [, ItemId] , OfficeId, UserId )
```

#### Parameters

**LicenseId**\
&#x20;The ID of the license the user should get removed from.\
&#x20;Type: Guid

***ItemId*** (optional)\
&#x20;The ID of the license item the user should get removed from.\
&#x20;Type: Guid

**OfficeId**\
&#x20;The office to filter the features (the current office if left empty).\
&#x20;Type: Guid

**UserId**\
&#x20;The ID of the user to remove assign the license from.\
&#x20;Type: Guid

#### Return Type

Void

## RunSelection

Runs a selection in a specific office and application, identified by a SelectionId with certain Parameters and optional LinkPath. RunSelection returns a list of objects.

#### Syntax <a href="#pragma-line-2409" id="pragma-line-2409"></a>

```
RunSelection ( OfficeId , ApplicationId , SelectionId , Parameters [, LinkPath] )
```

#### Parameters <a href="#pragma-line-2415" id="pragma-line-2415"></a>

***OfficeId***\
&#x20;The ID of the office the selection will be associated with.\
&#x20;Type: Guid

***ApplicationId***\
&#x20;The ID of the application the selection will be associated with.\
&#x20;Type: Guid

***SelectionId***\
&#x20;The ID of the selection which will be executed.\
&#x20;Type: Guid

***Parameters***\
&#x20;The parameters used for the selection.\
&#x20;Type: Dictionary\<String,Object>

***LinkPath*** (optional)\
&#x20;Navigation path to the object.\
&#x20;Type: LinkPath

#### Return Type <a href="#pragma-line-2438" id="pragma-line-2438"></a>

List\<Object>

## RunSelection

Executes a Selection and returns the result.

#### Syntax <a href="#pragma-line-2447" id="pragma-line-2447"></a>

```
RunSelection ( Selection [, InstanceId] )
```

#### Parameters <a href="#pragma-line-2453" id="pragma-line-2453"></a>

***Selection***\
&#x20;The Selection to execute.\
&#x20;Type: Selection

***InstanceId*** (optional)\
&#x20;The ID of the Instance to use as a context for the Selection.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2464" id="pragma-line-2464"></a>

List\<Object>

## SaveInstance

Takes an object as an input and saves that instance to disk.

#### Syntax <a href="#pragma-line-2473" id="pragma-line-2473"></a>

```
SaveInstance ( Object )
```

#### Parameters <a href="#pragma-line-2479" id="pragma-line-2479"></a>

***Object***\
&#x20;Object which will be saved to disk.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-2486" id="pragma-line-2486"></a>

Void

## Selection

Represents a Selection for later execution.

#### Syntax <a href="#pragma-line-2495" id="pragma-line-2495"></a>

```
Selection ( [SourceId] [, LinkId] , Layouts , Conditions )
```

#### Parameters <a href="#pragma-line-2501" id="pragma-line-2501"></a>

***SourceId*** (optional)\
&#x20;The ID of the Source Class.\
&#x20;Type: Guid

***LinkId*** (optional)\
&#x20;The ID of the Link of a Context where to execute the Selection in.\
&#x20;Type: Guid

***Layouts***\
&#x20;The Fields to request when executing the Selection.\
&#x20;Type: List\<Layout>

***Conditions***\
&#x20;The Condition used to filter when executing the Selection.\
&#x20;Type: List\<Condition>

#### Return Type <a href="#pragma-line-2520" id="pragma-line-2520"></a>

Selection

## SetEntry

Sets a Value of an entry with the given Key of a Dictionary.

#### Syntax <a href="#pragma-line-2529" id="pragma-line-2529"></a>

```
SetEntry ( Dictionary , Key [, Value] )
```

#### Parameters <a href="#pragma-line-2535" id="pragma-line-2535"></a>

***Dictionary***\
&#x20;The dictionary for which the entry is set.\
&#x20;Type: Dictionary\<Any,Any>

***Key***\
&#x20;The key for which the entry is set.\
&#x20;Type: Any

***Value*** (optional)\
&#x20;The value which is set.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2550" id="pragma-line-2550"></a>

Dictionary\<Any,Any>

## SetValue

Changes the value of a Field in an Object.

#### Syntax <a href="#pragma-line-2559" id="pragma-line-2559"></a>

```
SetValue ( Object , Field , Value )
```

#### Parameters <a href="#pragma-line-2565" id="pragma-line-2565"></a>

***Object***\
&#x20;Object which the value is set to.\
&#x20;Type: Object

***Field***\
&#x20;The name of the field to set.\
&#x20;Type: String

***Value***\
&#x20;Value which is set.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2580" id="pragma-line-2580"></a>

Void

## StatusFeedback

Sends feedback on the status of the executing script to the user. Can be used for checking result of a condition, switch, providing result values and similar.

#### Syntax <a href="#pragma-line-2589" id="pragma-line-2589"></a>

```
StatusFeedback ( Message [, Level] )
```

#### Parameters <a href="#pragma-line-2595" id="pragma-line-2595"></a>

**Message**\
&#x20;The message to be shown to the user\
&#x20;Type: String

***Level** (optional)*\
&#x20;The level of the feedback: Debug, Loading, Info (default), Error\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2606" id="pragma-line-2606"></a>

Void

## TableDefaultValue

Builds the Table default value. This should be used with the DefaultValue of a Parameter.

**Syntax**

```
String TableDefaultValue(
    List<Dictionary<String,Any>> Table
)
```

#### Parameters <a href="#pragma-line-2595" id="pragma-line-2595"></a>

**Table**\
&#x20;The table data to use as a default value.\
&#x20;Type: List\<Dictionary\<String,Any>>

**Return Type**\
String

## TableOptions

Builds the Table options. This should be used with the Options of a Parameter.

**Syntax**

```
TableOptions ( Columns [, DisableAddingRows] [, DisableDeletingRows] [, DisableSortingRows ] )  
```

#### Parameters <a href="#pragma-line-2595" id="pragma-line-2595"></a>

**Columns**\
&#x20;The columns configuration to edit the table.\
&#x20;Type: List\<Parameter>

***DisableAddingRows*** (optional)\
&#x20;The table configuration to restrict adding rows.\
&#x20;Type: Boolean

***DisableDeletingRows*** (optional)\
&#x20;The table configuration to restrict deleting rows.\
&#x20;Type: Boolean

***DisableSortingRows*** (optional)\
&#x20;The table configuration to restrict sorting rows.\
&#x20;Type: Boolean

**Return Type**\
Options

## UnpackZip

Unpacks a given ZIP archive and returns the content as a Dictionary.

#### Syntax <a href="#pragma-line-2615" id="pragma-line-2615"></a>

```
UnpackZip ( Archive )
```

#### Parameters <a href="#pragma-line-2621" id="pragma-line-2621"></a>

***Archive***\
&#x20;The Document to unpack.\
&#x20;Type: Document

#### Return Type <a href="#pragma-line-2628" id="pragma-line-2628"></a>

Dictionary

{% hint style="info" %}
Combination of this UnpackZip action with [GetDocumentValue ](#getdocumentvalue)action (Document \<Document>, PropertyName *ModificationTime*, PropertyName *MimeType*) gives you the possibility to retrieve modification time and mime type of the individual zip files/content..
{% endhint %}

## UploadDocument

Uploads a Document to a given Object.

#### Syntax <a href="#pragma-line-2637" id="pragma-line-2637"></a>

```
UploadDocument ( Object , Document )
```

#### Parameters <a href="#pragma-line-2643" id="pragma-line-2643"></a>

***Object***\
&#x20;The Object to upload the Document to.\
&#x20;Type: Object

***Document***\
&#x20;The Document to upload.\
&#x20;Type: Document

#### Return Type <a href="#pragma-line-2654" id="pragma-line-2654"></a>

Void

## Variable

Provides a container with a name, which can be used to store and reference all kind of values and Objects.

#### Syntax <a href="#pragma-line-2663" id="pragma-line-2663"></a>

```
Variable ( Name [, Expression] )
```

#### Parameters <a href="#pragma-line-2669" id="pragma-line-2669"></a>

***Name***\
&#x20;Name of the variable.\
&#x20;Type: String

***Expression*** (optional)\
&#x20;Value of the variable.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2680" id="pragma-line-2680"></a>

Any

## Variable2

Provides a container with a dynamic name, which can be used to store and reference all kind of values and Objects.

#### Syntax

```
Any Variable2(
    String Name,
    Any [Expression]
)
```

**Parameters**

* **Name**\
  Name of the variable.\
  Type String
* **Expression** (optional)\
  Value of the variable.\
  Type Any

**Return Type**

Any


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tivity.one/building-an-application/execution/scripting/functions/system-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
