Search

Module: Editor

Version: 2.2.1 +

User: Developer

Object Type: Calculation Object

Parent of:

no children

Child of:

- Action

- Node

- Document

- DatabaseView

 

Description

A DataTable consists of a number of rows and columns which can be set in the Editor after which it can be filled with values of a certain type, like numbers, dates or texts.

DataTables perform well up to a size 50x50, tables bigger than that are better implemented using XmlFields.

Properties

DebugLogMode (from version 4.1)

Indicates the level of detail of debug information that is logged when running a Futurama application (website, webservice, console application) to the trace, a logfile, a database etc. The possible values are:

  • None: no debug information is logged
  • Simple: only basic information is given
  • Extended: in addition to the information in the Simple mode the values of all the properties of the object are shown

IsPublic

Possible values are True or False. If the value is False, then the object can only be used within the document where it is created. If the value is True, then also from other Futurama documents can be referred to this object. This means that changes in the object also affect the document in which is referred to this object. If the value is True and you attempt to move or delete the object, a warning will be given. To limit these warnings to a minimum it is recommended to set IsPublic to True only when necessary.

ReturnsTable (until version 5.0)

This is an automatic property indicating whether the result of the Calculation object is a table. For a DataTable it is always True. From version 5.1.0 the ReturnsTable property is replaced by the Rank property (see property below).

Rank (from version 5.1.0)

The Rank property is an automatic property indicating the rank of the Calculation Object. Rank=0 implies a scalar. Rank=1 a vector and Rank=2 a matrix. For a DataTable the Rank=2.

XmlName

The name of the object as it is shown in the source of the website. By default the XmlName is equal to the name given in the property (Name) with spaces replaced by underscores, but you are free to change it.

(Name)

The name of the object.

Comment

Here a comment can be entered. For example a short description of the object.

ID

The unique identification number of the object. This number is automatically generated by Futurama on the moment of creation. This number can be used when searching for a certain object in the Find Window.

Text

Here the number of rows and columns can be stated and the values can be entered in the cells of the DataTable. The kind of values depends on the chosen Type. Furthermore the type of the Index column can be set. After the DataTable has been defined the property shows in x*y format the number of rows (x) and columns (y). From Futurama version 18.02 it is also possible to define the texts within a ResourceDocument. See the page Text management and Multi-language.

Type

The value of this property determines what kind of values can be entered at the property Text. The following types are available:

  • Long (an integer)
  • Double (a broken number)
  • Date
  • String
  • Boolean (a logical value which can be True or False)

Editing

Before a DataTable can be defined the type of the values that will be entered in the DataTable has to be denoted in the property 'Type'. Next the DataTable can be edited by either a a doubleclick on the DataTable in the Design Window or by first clicking on the property Text in the Properties Window of the DataTable and then on the editing box on the right of the property. Both methods will open up a window where the DataTable can be defined and filled.

First the type for the Index column has to be chosen. The index column is the utmost left column and is relevant when values will be looked up in the DataTable. For example the VLookUp formula searches in the Index column for a certain value and returns a value in a given column in the same row. Next with Column Count en Row Count the number of rows and columns can be set. Finally the individual cells can be filled with values of the type chosen in the property Type. Note that it is not only possible to have fixed values (Fixeds) in the DataTable, but also References to other Calculation objects and Formulas.

Importing from Excel

It is possible to import data straight from Excel to the DataTable. To do this first select and copy a tabel in Excel. Next you have to make sure the number of rows and columns of the DataTable correspond to the number of rows and columns in Excel. If this is the case click in the Index column on the first element. Then select the button 'Paste from Excel' and the data will be pasted.

Related Topics

Relevant Tutorials

- Working with Tables: Select part 2 of this tutorial to see how a DataTable is created.

 

Updated: 2018-02-16