CFT

Changes, with data from the terminal, any EntitySet, relationship with fields, form, or result set, prompting with field names and existing values.

Syntax

CFT [object [field]]

Parameters

objectThe name of an EntitySet, relationship with fields, form, or result set. A role name can be used. If omitted, the current set is used.
fieldA target field in object. If omitted, the software prompts for all fields in object in their defined order.

Comments

CFT object is short for CHANGE object FROM TERMINAL PROMPT.

Example

cft EntitySets

EntName  AvgSz  EntType  DirName

Employees   0

See Also

AFT

AFT

AFT (Add From Terminal)

Adding Data from the Terminal to an EntitySet or Relationship

Overview

The AFT command allows users to add data from the terminal to any EntitySet or relationship with fields. This command is interactive, prompting users to input data for specified fields.

Syntax

AFT [object [field]]

Parameters

  • object: The name of an EntitySet or relationship with fields. A role name can also be used.
  • field: A target field in the object. If omitted, the software will prompt for all fields in the object in their defined order.

Comments

  • AFT field stands for ADD object FROM TERMINAL PROMPT. This command is designed to facilitate data entry directly from the terminal, making it easier to populate fields interactively.

Examples

Example 1: Adding Data to an EntitySet

To add data to an EntitySet named Ents, you would use the following command:

aft Ents

EntName  EntType  AvgSz  DirName

:

This command will prompt you to enter values for EntName, EntType, AvgSz, and DirName in sequence.

Example 2: Adding Data to Specific Fields

To add data to specific fields in an EntitySet named Customers, you would use the following command:

aft Customers LastName FirstName TelNum

LastName  FirstName   TelNum

:

This command will prompt you to enter values for LastName, FirstName, and TelNum in sequence.

Usage Tips

  • Ensure that the object name is correctly specified to avoid errors.
  • If you omit the field parameter, be prepared to enter data for all fields in the object in their defined order.
  • Use role names if applicable to simplify the command.

By using the AFT command, you can efficiently add data to your EntitySets or relationships directly from the terminal, streamlining your data entry process.

See Also

CFT

$Graphics

The name of a graphics software package.

Syntax

$graphics

Return Value

A character string. Can be reset by an application program.

Description

Set by the application program to the name of a graphics program.

$Graphics can be set to the name of a graphics program of your choosing. The name should include the full disk path. The special file path indicator characters can be used.

The GRAPH command automatically calls up the program named in the $Graphics system variable.

When running ZimTC, the following code will simply copy the “xxx.zzz” to the client side without executing any further actions:

let $graphics = ""
graph "xxx.zzz"

Example

let $graphics = "c:chartappchart.exe"

See Also

$ClipPath

$DBPath

$Editor

$ImagePath

$WorkPath

$ZimPath

About Character Literals

GRAPH

System Variables

$minof

Returns the smaller of a pair of numbers.

Syntax

$minof(number1,number2)

Parameters

number1a number or an expression that evaluates to a number
number2a number or an expression that evaluates to a number

Return Value

The value returned by $minof has the same number of decimal places as the number that is returned.

Comments

The function returns the larger of a pair of numbers.

Example

if event.eventname = "down"
let IndexPtr = $minof(IndexPtr+1, ArrayLen)
else
... other commands ...
endif

Modifies an array index, without letting the index exceed the specified number.

See Also

$maxof

About Functional Expressions

$direction

Indicates the direction in which focus was moving when an event occurs.

Syntax

$direction

Return Value

A number (-1, 0, or +1.) Can be reset by an application program.

Description

The direction of travel of focus when an event occurred.

ValueMeaning
-1“Backward” direction. The focus was moving backward (with respect to the current TABORDER) when an event occurred.
0No direction. The focus is not moving.
+1“Forward” direction. The focus was moving forward (with respect to the current TABORDER) when an event occurred.

See Also

FORM INPUT

MENU INPUT

System Variables

WINDOW SET

$isodd

Tests if a number is odd.

Syntax

$isodd(expression)

Parameters

expressiona number, or an expression that evaluates to a number

Return Value

If expression evaluates to an odd number, the function returns “1” ($True); if expression evaluates to an even number, the function returns”0″ ($False)

If expression does not evaluate to a number, the software raises an error.  The function returns “0” ($False).

Comments

Expression is rounded before testing.

Example

$isodd(vAmount)=$False

Evaluates to $True if vAmount is even.

$isodd(-5)

Evaluates to $True.

$isodd(Salary*1.1)

Evaluates to $False if Salary is 20,000.

$isodd("123.4")

Evaluates to $True.

$isodd("abc")

Evaluates to $False.

See Also

$isnumber

About Functional Expressions

$month

Extracts the month number associated with a specified date value.

Syntax

$month(date)

Parameters

datea data, or an expression that evaluates to a date, in the form YYYYMMDD

Return Value

Character string.

Comments

This function extracts month information from standard date values. Date is often the system variable $Date.

Example

$month(19931225)

Evaluates to “12”.

$month($date+7)

Evaluates to “1” when $Date is 19991225.

See Also

$addmonths

$Date

$day

$dayname

$monthname

$weekday

$year

About Data Types

About Functional Expressions

RELEASE

Closes an application directory.

Syntax

RELEASE directoryname

Parameters

directorynameThe name of an application directory.

Comments

The RELEASE command closes the specified directory by removing it from the directory list, freeing the memory where the symbols defined in the directory were stored. Objects (and their data) belonging to the specified directory are no longer accessible.

Example

access DevDir update

access ProdDir read

add DevDir.Employees from ProdDir.Employees

add DevDir.Departments from ProdDir.Departments

add DevDir.Projects from ProdDir.Projects

release ProdDir

The preceding commands copy data from a production database to a development database, then close the production database so that subsequent commands are sure to affect only the development database.

See Also

$dirpath

ACCESS

$isdigit

Tests if a character string contains only digits.

Syntax

$isdigit(string)

Parameters

stringa character string or an expression that evaluates to a character string

Return Value

1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).

Comments

This function tests if a particular character string is all digits.

Example

$isdigit("0123")

Evaluates to $True.

$isdigit(2.3)

Evaluates to $False.

See Also

$isalphabetic

$isalphanumeric

$isdate

$islower

$isnumber

$isupper

$iszimname

About Character Literals

About Functional Expressions

$ObjEventName

Obtain the name of the current event.

Syntax

$ObjEventName

Return Value

Returns a string.

Warning

COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.

en_CAEnglish