Versions Compared

Key

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

...

OperationUsageDescriptionExampleVersion

Assigning multiple values to the variable

Set(variable,

value)

It is used to assign a value to a variable. A fixed value or another variable can be given as a parameter.

Set(@barcode, "B0001")

Set(@sonLot@lastLot,@lot)

1.0

Assigning multiple values to the variable

Set(variable,

JSON)

It is used to keep multiple values in the breakdown of a variable. The value to be assigned is written between the { } characters

and in a valid JSON format.

The arrays in JSON format are supported. If an array is given, the variable values are indexed as one row each.

If an object is not defined for array elements, the index number is used.

A fixed text or variable can be used in JSON.

Set(@stock,{"stk_code":1,"stk_name":"@materialname","stk_id":1})

Usage: @stock.stk_code

Set(@companies,{["A company", "B company", "C company"]})

Usage: @companies.0

Set(@list,{"Lines" : [{"name": "Ali", "surname" : "Demir"}, {"name": "Ali",

"surname" : "Demir"}]});

Usage: @list.Linelar.0.name

1.0

Text

combining

Set(variable,

text1+

text2)

It is used to combine two texts. Texts should be written between double quotes. A fixed text or variable can be written.

Set(@namesurname, "Ali " + "Kaya")

Set(@barcode, "P"+"@code")
1.0

Arithmetic

Operations

Set(variable,

number1+-/*

Supported operations: Addition (+ ), Subtraction ( - ), Multiplication (*), Division (/), Mode(%)

If a variable is to be used in operations, it is assumed that the variable is a number value.

If the result of the operation is incorrect, the value of the result variable is "ERR".

Set(@result,45 + 9)

Set(@result,@number1 - @number2)

Set(@result,@number % 5)

1.0

Style Operations

Set(@Style.

variable,

JSON)

This creates a style for the Text, ShowMessage, PopupView, TableView, MenuItem commands used to display information on the handheld terminal screen. Styles are defined as a variable under the @Style object.

Types of styles that can be used :

  • color : Text color - Background color (separated by line mark ( - ) with Telnet color names)

List of colors available for Android: https://docs.microsoft.com/trtr/dotnet/api/xamarin.forms.color?view=xamarin-forms

  • effect : Bold/Underline/Blink (Bold-Underline-Blink options can be used by separating them with a hyphen sign ( - ))
  • border : Border (For Telnet only. If this option is defined, at least 3 lines of space are used on the screen.)
    • None: No border
    • Single : Single line
    • Double: Double line
    • Dashed: Dashed line
    • Thick: Thick pattern
  • size : Text size (Only for Android) (Values that can be used: 1-Tiny, 2-Small, 3-Normal, 4-Large) If this feature is not used, the default value is considered as 2.

Default style values:

@Style.default.text (Default text style) : {"color" : "White-Black"}

@Style.default.border (Default frame style) : {"border" : "Single"}

@Style.default.title (Default title style, for commands that use a title) : {"color" : "White-Black"}

@Style.default.button1 (Default 1st left button style, for ShowMessage) : {"color" : "Black-White"}

@Style.default.button2 (Default 2nd left button style, for ShowMessage) : {"color" : "Black-White"}

@Style.default.button1 (Default 3rd left button style, for ShowMessage) : {"color" : "Black-White"}

@Style.default.menu (Default menu option style) : : {"color" : "White-Black"}

@Style.default.menuhover (Default selected menu option style) : {"color" : "Black-White"}

@Style.default.ColumnHeader (Default table column headers style) : : {"color" : "White-Black"}

These values are assigned with the values above when logged in, they can be changed by the user.

A style can be defined for each field shown in the TableView/PopupView command. The fields field added to the @Style variable is used for this job. In the PopupView/TableView definition, a style can be defined according to the number of field indexes under the fields element for each field to be displayed.

Set(@Style.Error, {"color" : "Black-White", "effect" : "Bold-Blink"})

Set(@Style.default.text, {"color" : "White-Red"})

Usage: Text(1,13, @MESAJ2,{"style":"@Style.Error"})



Set(@Style.title, {"color" : "Red-Black","effect" : "Bold-Blink", "size":"4"}) // Android



Set(@Style.popup.fields.1, {"color" : "Green", "effect" : "Bold", "size":"2"})


Set(@Style.popup.fields.2, {"color" : "Red", "effect" : "Bold", "size":"1"})


PopupView(@list.rows,{"mode":"card","title":"Customer List"," fields":["Code|Code|10|L","Title|Title|20|L","City|City|10|L"], "style":"@Style.popup"},@selection

1.0

Android için 1.2 for Android


Text and Date Commands

Command Name

Usage

Description

ExampleVersion

Left

Left(text, number of characters, result variable)

Assigns the specified number of characters to the result variable starting from the left of the given text.

Left(@barcode,5,@materialcode)

1.0

Right

Right(text, number of characters, result variable)

Assigns the specified number of characters to the result variable starting from the right of the given text.

Right(@barcode,5,@materialcode)

1.0

Mid

Mid(text, start, length, result variable)

Assigns the specified number of characters to the result variable starting from the initial character of the given text.

Mid(@barcode,5,4, @materialcode)

1.0

Pos

Pos(searched value, json array or text, result variable)

Assigns the position of the searched value in a text or JSON array to the result variable.

If searching is performed in the text, it shows the character position, if searching is performed in the JSON array, it shows which elements of the array it is. In the JSON object, the array name is expected to be "param".

If the searched value is not found, "-1" returns as the result, if the operation is incorrect, the result is "ERR".

Pos("001","P001",

@result)

Result: 2

Pos("K03",{"param":

["K01","K02","K03"]},

@result)

Result:3

1.0

TrimLeft

TrimLeft(text,length, result variable)

Deletes the specified length from the left of the given text.

TrimLeft(@barcode,5,@materialcode)

1.0

PadRight

PadRight(text, length, character, result variable)

Adds the requested character in the specified length to the end of the given text.

PadRight("K01",5,"0",

@result)

Result: K0100000

1.0

Split

Split(text, bracket, result variable)

Divides the given text into parts by using the specified characters as brackets. Places the values in the breakdowns of the given result variable.

Split(@barcode, "-",

@codes)

Usage: @codes.1

1.0

SplitForm at

SplitFormat(text,format, result variable)

Divides the text into variables according to the given format. When defining the format, the numbers 1-9 represent the child elements of the variable to be generated. It transfers the parts marked as 1 to the 1st child element.

- character refers to sections that will not be included in the result.

* character is used at the beginning or at the end. If it is used, the remainder of the format length is transferred to the 10th lower element. If it is used at the beginning, the part of the text in the specified format on the right is processed. The remaining is transferred to the 10th child element.

SplitFormat

("NS140271.98",

"--111111-22",

@result)

@result.1 = 140271

@result.2 = 98

SplitFormat

("123456999",

"111222*",@result)

@result.1 = 123

@result.2 = 456

@result.10 = 999

1.0
SplitRegex

 SplitRegex(text, regex format, result variable)

Divides the given text into result variables according to the requested Regular Expression.

The used Regular Expression must be defined correctly.

Each parenthesis used in the Regular Expression outputs a child element of the variable.

SplitRegex("SNO-AAA-

001","SNO-([A-Z]{3})[-.]

(\d+)",@result)

@result.1 = AAA

@result.2 = 001

https://regex101.com

/r/klWTkq/2

1.0

Variable.

IsNumber

variable.IsNumber

Specifies whether the given variable is a number. If it is a number, it returns 0; if not, it returns -1.

If(@code.IsNumber="0",

Goto(Detail),Goto

(Error))

1.0

Variable.

IsDate

variable.IsDate

Specifies whether the given variable is a date. If it is in date format, it returns 0; if it is not, -1.

If(@code.IsDate="0",

Goto(Detail),Goto

(Error))

1.0

Variable.

IsAlpha

variable.IsAlpha

Specifies whether the given variable (consisting of letters and numbers) is an alphanumeric value. If the format is appropriate it returns 0; if not, -1.

If(@code.IsAlpha="0",

Goto(Detail),Goto

(Error))

1.0

Variable.

Base64

variable.Base64

Converts the value of the given variable to Base64.

Text(1,1,

@materialcode.

Base64)

1.2

Today

Today(date format, result variable)

Assigns the current date to the result variable in accordance with the given format. This document can be used for date formats that can be used.

Today("dd.MM.yyyy", 

@today)

1.0

Now

Now(date format, result variable)

Assigns the current date and time information to the result variable in accordance with the given format. This document can be used for date formats that can be used.

Now("hh:mm",@now)

1.0

FormatDate

FormatDate(day,month,year,format,result variable)

Creates a date in the specified format with the given day/month/year values. If the appropriate values for the date are not given, the -1 value returns.

FormatDate(1,1,2000,"

yyyy-MM-dd",@date)

1.0

FormatDateTime

FormatDateTime(day, month, year,hour, minute, second,format,result variable)

Creates a date in the specified format with the given day/month/year/minute/second values. If the appropriate values for the date are not given, the -1 value returns.

FormatDateTime 

(1,1,2000,12,12,0,"

yyyy-MM-dd hh:mm",

@date)

1.0

...