variable_management [TAST DokuWiki ]

User Tools

Site Tools


Sidebar

First steps in TAST

What is UML

Computer setup for TAST use

FAQ

Recognized Issues

TAST tool Menu

TAST Adaptors

Adaptors examples

TAST Integrations

Interesting features

Documentation of technical administration

Modeling recommendations

Training in the TAST tool

variable_management

Variables Management in TAST

This is the information about how to use and manage the variables in TAST.

Validations in Frontend of the data types:

The web application should prevent situations like this:

Or situations like this one:

The validation in Frontend will be done by javascript. It would be a good option to leave the numeric keys only active in the case of integer value.

Using more than one data type for the same variable

Can another type of data be assigned to the same variable? Yes, there is no need or impediment to be rigid.

Using colors in messages that declare variables

In this way, the user could at a simple glance understand that the variable he has used is not the same type of data as the variable he is declaring.

Introduction of specific controls associated with variables

  • In a setVariable, depending on the type of data selected, show:
  • TastDataBoolean: checkbox.
  • TastDataInteger: text input that allows you to enter only numbers (without a comma, no points) or Integer variables.
  • TastDataString: n.a
  • TastDataDouble: text input that allows to enter only numbers or variables of type Integer or Double.
  • TastDataDate: text input with calendar. It allows to enter variables of type TastDataDate. You must validate the date before saving.

Validations in Backend

Text.

List of Casting allowed / not allowed in TAST

From/To StringBooleanIntegerDoubleDate Table
StringDon't ApplyAssigns a Boolean object that represents the true value if the String is not null and is equal, ignoring case, to the “true” string. Returns Integer if String is a number. If it is a number like 100.00, everything that comes behind the point is deleted. If it is not number it throws exception.Returns Double if String is a number. If it is not a number, it throws an exception.Returns Date if String is date. If it is not a date, or does not find the format, it throws an exception.Returns a table with a column, and a row with the string.If the string is separated by comma, or semicolon, we create as many columns as commas.
BooleanReturns what the getStringValue () function returns;Don’t ApplyReturns 1 if it is true and 0 if it is falseReturns 1.00 if true, and 0.00 If it is falseException. Not allowed.Returns a table with a column, and a row with the boolean
IntegerReturns what the getStringValue () function returns;Returns true if it is a number greater than 0, and false if it is null or 0Don’t ApplyReturns the integer with .00Exception. Not allowed.Returns a table with a column, and a row with the Integer
DoubleReturns what the getStringValue () function returns;Returns true if it is a number greater than 0, and false if it is null or 0Returns an Integer (e.g. 5.25 → 5)Don’t ApplyException. Not allowed.Returns a table with a column, and a row with the Double
DateReturns what the getStringValue () function returns;Exception. Not allowed.Exception. Not allowed.Exception. Not allowed.Don’t ApplyReturns a table with a column, and a row with the Date
Table
(see the following chapter “Additional information about Variables in TAST”)
Returns what the getStringValue () function returns;Exception. Not allowed.Exception. Not allowed.Exception. Not allowed.Exception. Not allowed.Don’t Apply

Additional information about Variables in TAST

You should consider this information: In the application there are new data types that are not displayed in the frontend, but internally are being used by TAST. They will be available soon as a part of the new adaptors we are currently building:

  • TastRowTableData.
  • TastIterateTableData.
  • TastTableCell.
  • Variant.
  • Collection.
  • Lists.

In setVariable, there are data types that cannot be entered for the moment:

  • TastRowValues.
  • TastHttpResponse.
  • TastHtmlTable.
  • TastTableData.
  • Variant.
  • Collection.
  • Lists.

To work with the TastRowValues and TastTableData data types, it is recommended to use executeJavascript using the following functions:

  • addCellValue(String value): adds a String to the list.
  • addCellValue(TastDataGeneric dataGeneric): adds an element to the list.
  • getCellValue(index): returns the contents of a cell (starting at 1).
  • getLength(): returns the element number of the list.
  • getStringValue(): returns the contents of the list in a String.

Confirmation when you are deleting messages and variables

When you delete a message, an another UML item or a variable, is appears a confirmation message before the deletion.

In the case of the variables, TAST asks not only for the variables but also for the references to them.

variable_management.txt · Last modified: 2023/12/18 14:56 (external edit)