Skip to end of metadata
Go to start of metadata

TableStore is a textual data structure in JSON format representing the state of a dynamic table embedded on a PlusWorkflow system form. Together with the provided functions it allows you to easily manipulate data within a table and move data between tables.

Save TableStore in variables

Due to the large size of "TableStore" objects (often exceeding 4,000 characters), it is recommended to store the TableStore in form parameters, which have an unlimited size compared to "ordinary" form variables.

TableStore structure

A valid TableStore object must contain two fields:

  • variableType - JSON Object (key-value object), containing the definition of the fields of the TableStore object. The keys are IDs and the values are the types of variables that make up the table, the state of which is to be reflected by the TableStore object,
  • data - JSON Array (an array of key-value objects), containing JSON objects representing individual rows of the table, where the key is the ID of the variable and the value is the value of the variable in the table row.

Field types

The fields of the TableStore object take the same types as the variables that make up the table whose state is represented. Possible types are: date, float, integer, string.

Default values of variables

Variable typeDefault value
datenull
float0.0
integer0
string"" (empty string)

Example

The above table will be presented as:

TableStore
{"variableType":{"tekstowy":"string","datowy":"date","zmiennoprzecinkowy":"float","calkowity":"integer"},"data":[{"tekstowy":"przykładowy tekest","datowy":"2021-03-01","zmiennoprzecinkowy":123.13,"calkowity":123},{"tekstowy":"","datowy":null,"zmiennoprzecinkowy":0.0,"calkowity":0},{"tekstowy":"przykładowy tekst 2","datowy":"2021-03-15","zmiennoprzecinkowy":321.12,"calkowity":321}]}

FAQ

 Does the order of fields matter?

No,

TableStore
{"variableType":{"tekstowy":"string","datowy":"date","zmiennoprzecinkowy":"float","calkowity":"integer"},"data":[{"tekstowy":"przykładowy tekest","datowy":"2021-03-01","zmiennoprzecinkowy":123.13,"calkowity":123},{"tekstowy":"","datowy":null,"zmiennoprzecinkowy":0.0,"calkowity":0},{"tekstowy":"przykładowy tekst 2","datowy":"2021-03-15","zmiennoprzecinkowy":321.12,"calkowity":321}]}

and

TableStore
{"variableType":{"datowy":"date","calkowity":"integer","tekstowy":"string","zmiennoprzecinkowy":"float"},"data":[{"tekstowy":"przykładowy tekest","datowy":"2021-03-01","zmiennoprzecinkowy":123.13,"calkowity":123},{"calkowity":"0","zmiennoprzecinkowy":0.0,"datowy":null,"tekstowy":""},{"zmiennoprzecinkowy":"321.12","calkowity":321,"tekstowy":"przykładowy tekest","datowy":"2021-03-15"}]}

are equivalent representations of the same TableStore object (they are equal to each other). This follows from the JSON standard.

 Does the decimal format for the float matter?

The float format expected by TableStore must include a dot separating the non-zero fractional part, e.g. 16.8, etc. The zero decimal part can be omitted, i.e. the example notation - 0.0 and 0 is equivalent.

  • No labels