Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Polish

TableStore jest tekstową strukturą danych w formacie JSON reprezentującą stan tabeli dynamicznej osadzanej na formularzu systemu PlusWorkflow. Wraz z dostarczonymi funkcjami umożliwia łatwe manipulowanie danymi w obrębie tabeli oraz przenoszenie danych pomiędzy tabelami.

Info
titleZapis TableStore w zmiennych
Z uwagi na duży rozmiar obiektów "TableStore" (często przekraczający 4000 znaków) zalecamy przechowywanie TableStore w parametrach formalnych, które posiadając nieograniczony rozmiar w stosunku do "zwykłych" zmiennych formularza.

Struktura TableStore

Poprawny obiekt TableStore musi zawierać dwa pola:

  • variableType - JSON Object (obiekt typu klucz-wartość), zawierający definicję pól obiektu TableStore. Kluczami są ID, a wartościami typy zmiennych tworzących tabelę, której stan ma odzwierciedlać obiekt TableStore,
  • data - JSON Array (tablica obiektów typu klucz-wartość), zawierająca obiekty JSON reprezentujące poszczególne wiersze tabeli, gdzie kluczem jest ID zmiennej, a wartością wartość danej zmiennej w danym wierszu tabeli.

Typy pól

Pola obiektu TableStore przyjmują te same typy co zmienne tworzące tabelę, której stan jest reprezentowany. Możliwe typy to: date, float, integer, string.

Domyślne wartości zmiennych

Typ zmiennejDomyślna wartość
datenull
float0.0
integer0
string"" (pusty string)

Przykład

Image Modified

powyższa tabela zostanie zaprezentowana jako:

Code Block
languagejs
titleTableStore
{"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

Expand
titleCzy kolejność pól ma znaczenie?

Nie.

Code Block
languagejs
titleTableStore
{"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}]}

oraz

Code Block
languagejs
titleTableStore
{"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"}]}

są równoważnymi reprezentacjami tego samego obiektu TableStore (są sobie równe). Wynika to ze standardu JSON.

Expand
titleCzy format cześci dziesiętnej dla floata ma znaczenie?

Oczekiwany przez TableStore format float musi zawierać kropkę oddzielającą niezerową cześć ułamkową, np. 16.8 itp. Zerowa część dziesiętna może być pominięta, czyli przykładowy zapis - 0.0 oraz 0 jest równoznaczny.

English

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.

Info
titleSave 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

Image Added

The above table will be presented as:

Code Block
languagejs
titleTableStore
{"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

Expand
titleDoes the order of fields matter?

No,

Code Block
languagejs
titleTableStore
{"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

Code Block
languagejs
titleTableStore
{"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.

Expand
titleDoes 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.