current date | The date recorded by the system clock (a date value). The year part is a two digit number. |
current extended date | The date recorded by the system clock (a date value). The year part is a four digit number. |
current time | The time recorded by the system dock (a time value). |
current page number | In DataEase, this command is replaced by the Page Number applicationvariable. current page number is included only to maintain compatibility with applications created in character-based versions of DataEase. See DG 6 for information on creating application variables. |
current Item number | The number of the current record. Records are automatically counted as they are processed by the procedure (a numeric value). |
current user name | The name used to sign onto the application (a text value). |
current user level | The current user's security level (a numeric value from 1 to 7). |
current computername | The name of the workstation running the procedure when using DataEase in a multi-user environment (a text value set by the DENAME environmentvariable). |
current status | The value of the processing action selected following the DQL input usingcommand or the status of the last DQL command that modifies data. By testing the current status variable, you can control subsequent processing following an input using command or check for errors following a DQL command that modifies data. See the input using command for an example of current status used with the input using command. |
Date, Exended Date, Time, Page Number, Item Number, User Name, User Level, Computername, Status
Example 1
Using current username to display a welcome message in a virtual field. The current user is Andy MacGrath
concat("Welcome to our application ", current username, " ;-)")
Result: Welcome to our application Andy MacGrath ;-)
Example 2
Using current user level to show or hide the secret field Customer Comments.
if (current user level = high, SetState("Customer Comments",1), SetState("Customer Comments",0))
Result: This will hide the field if the current user level is lower then High and show it if it is High.
Example 3
list records
current date ;
current user name .
for MEMBERS with TOTAL DUE > 175 ;
list records
LAST NAME in order ;
TOTAL DUE ;
current item number end
This script tells DataEase: (1) Select the MEMBERS records that have a TOTAL DUE value greater than $175, (2) list the LAST NAME and TOTAL DUE values and current item number (record number) from each record that is processed, and (3) list the current date (today's date) and the current user name (the name of the user who generated the report).
The output from this script might looks as follows:
Report generated by: George McGrath Date: 01/20/99
Item #
Last Name
Total Due
1
Perrault
215.00
2
Christino
280.00
3
Stafford
185.00
4
Strachan
205.00
See also commit, data-entry, exec SQL, global, input using, temp.
Variable component
Purpose
The current keyword lets you access any of the eleven system defined variables summarized below and on the following page.
Variables Used with the current Keyword
The date recorded by the system clock (a date value). The year part is a two digit number.
| |
Current extended date |
The date recorded by the system clock (a date value). The year part is a four digit number.
|
The time recorded by the system dock (a time value). | |
|
|
In DataEase, this command is replaced by the Page Number applicationvariable. current page number is included only to maintain compatibility with applications created in character-based versions of DataEase. See DG 6 for information on creating application variables. | |
|
|
The number of the current record. Records are automatically counted as they are processed by the procedure (a numeric value). | |
|
|
The name used to sign onto the application (a text value). | |
|
|
The current user's security level (a numeric value from 1 to 7). | |
|
|
The name of the workstation running the procedure when using DataEase in a multi-user environment (a text value set by the DENAME environmentvariable). | |
|
|
The value of the processing action selected following the DQL input usingcommand or the status of the last DQL command that modifies data. By testing the current status variable, you can control subsequent processing following an input using command or check for errors following a DQL command that modifies data. See the input using command for an example of current status used with the input using command. |
The following variables are used only in applications that access data on an SQL database:
The SQL Error Code number generated by the server when an error occurs during the processing of an SQL statement (e.g., CREATE, INSERT, UPDATE, or DELETE). current SQLCODE is set to zero if the last SQL statement is processed without error. Server-specific error codes are explained in your database engine documentation. See the commit andexec SQL commands for examples. | |
|
|
The number of rows processed by the procedure. See the exec SQLcommand for an example. | |
|
|
The SQL Message Text generated by the server, in addition to any errors and warnings (a server can return a current SQLCODE value of zero and still generate SQL Message Text). DataEase displays the first 50 characters of the message. Server-specific messages are explained in your database engine documentation. See the exec SQL command for an example. |
Note: See input using for examples demonstrating the use of the current status variable. See commit for examples that use current SQLCODE and current SQLCOUNT. See exec SQL for examples using current SQLCODE, current SQLCOUNT, and current SQLMSGTXT.
When current status is used with the input using command, it returns a numeric value from 1 to 4 depending on which menu selection (or icon) the user chooses after entering data.
When current status is used with an enter a record, modify records, delete records, or commit command, it returns 0 (zero) if the command is processed successfully and -1 (negative 1) if the command fails.
Syntax
current variable name
Example
list records
current date ;
current user name .
for MEMBERS with TOTAL DUE > 175 ;
TOTAL DUE ;
This script tells DataEase: (1) Select the MEMBERS records that have a TOTAL DUE value greater than $175, (2) list the LAST NAME and TOTAL DUE values and current item number (record number) from each record that is processed, and (3) list the current date (today's date) and the current user name (the name of the user who generated the report).
The output from this script might looks as follows:
Report generated by: George McGrath Date: 01/20/99
Item # |
Last Name |
Total Due |
1 |
Perrault |
215.00 |
2 |
Christino |
280.00 |
3 |
Stafford |
185.00 |
4 |
Strachan |
205.00 |
Product: DataEase for Windows 7.x. Written by George Washington 11/04/14 at 08:26:17
Product: DataEase 8 Reporter. Written by eduardo paez 02/05/14 at 14:40:11
Product: . Written by Marco Marchesi 15/02/16 at 14:50:46
Product: . Written by Grossi Gioacchino 18/11/19 at 14:33:44
Product: Dataease [{8}]FIVE. Written by Rainer 22/03/21 at 11:13:10
Product: Dataease [{8}]FIVE. Written by Rainer 08/06/21 at 14:12:40