Easy to Create, Easy to Change - Easy to use!

Function::Internal

Current

CURRENT DATE|CURRENT EXTENDED DATE|CURRENT TIME|CURRENT PAGE NUMBER|CURRENT USER LEVEL|CURRENT COMPUTERNAME|CURRENT STATUS

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.


Syntax:
CURRENT Parameter(s)

Parameters


Date, Exended Date, Time, Page Number, Item Number, User Name, User Level, Computername, Status

Returns/Result


Correct Type for Function. Current User Name will return Text String. Current Date will return Time Value and Current Date will return Date value etc. When current status is used with the input using command, it returns a numeric value from 1 to 4 depen

Examples


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

Reference

current

See also commit, data-entry, exec SQL, global, input using, temp.

 

Type

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

 

 

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.

 

The following variables are used only in applications that access data on an SQL database:

 

 

current SQLCODE

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.

 

 

current SQLCOUNT

The number of rows processed by the procedure. See the exec SQLcommand for an example.

 

 

current SQLMSGTXT

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 ;

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


GetCurrent

On the forum about Current

While current status not = 1 do. Will not open input form

I am trying to open a form & post information from that form to other forms using the following, however DE8 will not open the form. If i remove the "while current.... do . " the form "Deposit Close_Retrurn" will not open!while curren...

Product: Dataease [{8}]FIVE. Written by Graham Brown 02/02/14 at 10:50:34

Re:While current status not = 1 do. Will not open input form

We just tested this in 8.1.1.1450 (shouldn't be any difference to any previous versions of DE8) and it worked fine. Obviously we didn't test your app as we don't have it, but a input using in general: <span style="color: r...

Product: Dataease [{8}]FIVE. Written by DataEase Tech Sup 03/02/14 at 08:57:00

Re:Re:While current status not = 1 do. Will not open input form

I have looked at the database in question and have found the following:-Problem 1: The table of the form that was the subject of the input using statement was duplicated - I deleted the duplicate in the manner suggested in a recent Forum postin...

Product: Dataease [{8}]FIVE. Written by Peter Birney 03/02/14 at 11:31:26

Re:Re:Re:While current status not = 1 do. Will not open input form

This simple DQL does not display any messages.&nbsp; When run in Design View the flashing cursor disappears.define "pob" Number .pob := 0 .while pob &lt; 5 do .message pob window .pob := pob + 1 .end .message "The...

Product: Dataease [{8}]FIVE. Written by Peter Birney 04/02/14 at 07:59:18

Re:Re:Re:Re:While current status not = 1 do. Will not open input form

Hi! We have just tested this while loop in 6.53 7.2 and 8.1 and it works fine.There must be something "environmental" here that impacts this. Is this in a fresh app or is it in the app that had problems with the while loop earlier?&nbsp;<b...

Product: Dataease [{8}]FIVE. Written by DataEase Tech Sup 04/02/14 at 10:04:40

Re:Re:Re:Re:Re:While current status not = 1 do. Will not open input form

Hi - It works fine in a new app - I will ask Graham if he will let you have a copy of his database (It may still have the duplicate Table Name).Can you advise us where to send it?...

Product: Dataease [{8}]FIVE. Written by Peter Birney 04/02/14 at 10:21:41

Re:Re:Re:Re:Re:Re:While current status not = 1 do. Will not open input form

[@EOF@]...

Product: Dataease [{8}]FIVE. Written by Graham Brown 05/02/14 at 14:58:33

GetCurrent( )

Is there a list somewhere of all the values that can go with this...

Product: Dataease [{8}]FIVE. Written by Gregor Popp 28/08/14 at 06:18:53

Re:GetCurrent( )

Dear Mr. Popp of course there is.http://www.dataease.com/dg3_HelpView/?PageID=10314...<strong st...

Product: Dataease [{8}]FIVE. Written by DataEase Tech Sup 28/08/14 at 09:27:51

How can I get current application name to appear in a field

[@EOF@]...

Product: Dataease [{8}]FIVE. Written by Gregor Popp 28/08/14 at 10:47:03

Re:How can I get current application name to appear in a field

Instead of object type field, there is anoher object type called Application Variable.&nbsp; Put this on the form instead, and choose Application Name from the drop down.&nbsp; not sure what you want to do but I use this as a form heading to identify...

Product: Dataease [{8}]FIVE. Written by Simon B 28/08/14 at 11:22:12

Current stable version of DE8

Hi there,I saw the announcement (http://www.dataease.com/DG3_BlogList/?ParentID=000... that DE8.5 is stable and can be used in production environment...

Product: Dataease [{8}]FIVE. Written by George Washington 09/06/15 at 09:40:01

Re:Current stable version of DE8

Hi Gorge.In the GROUP section we only load up stable versions so use the latest one.They will all be tagged as BETA until the full release of 8.5. The GROUP release is only a service for customers that have elected to run 8.5 in produc...

Product: Dataease [{8}]FIVE. Written by DataEase 10/06/15 at 07:37:46

TABLE VIEW NOT KEEPING CURRENT RECORD ON SCREEN

Have just upgraded from 6.1 to LegEasy6 with no problems, except when switching to TABLE VIEW over a form. Example view any record in FORM VIEW then switch to TABLE VIEW and table defaults to first record in file not current one being viewed. Also in...

Product: LegEasy 6 Windows. Written by KEV 09/09/15 at 13:26:31

Problems with GetCurrent() and SetStyle() in a subform.

I am using DE8.5.0.2115.The problem I am having is to do with sub forms and SetStyle to the record that I am actively on when I scroll down through the sub form. I have used a virtual field “vManip” with the following script: SetVar("RowNr", Ge...

Product: Dataease [{8}]FIVE. Written by Henry Gondorf 27/01/16 at 18:37:07

Re:Problems with GetCurrent() and SetStyle() in a subform.

1. The GetCurrent("RowNumber") reports the correct RowNumber most of the time. Due to the intricacies of the DataEase Multiview it can report 2 for row Number one, but it is consistent when it first happen so then you can just deduct one as you have h...

Product: Dataease [{8}]FIVE. Written by DataEase 27/01/16 at 20:13:36

Re:Re:Problems with GetCurrent() and SetStyle() in a subform.

Thank you for your reply.Item 1. I am not using this script in OML. It is being used as a derivation in a virtual field, “vManip1”, that I created on the table view specifically for this action.Item 2. I created the variable “RowNr” so...

Product: Dataease [{8}]FIVE. Written by Henry Gondorf 28/01/16 at 09:57:36

Re:Re:Re:Problems with GetCurrent() and SetStyle() in a subform.

Download Sample You are right (and wrong) and so am I ;-) Firstly I applaud...

Product: Dataease [{8}]FIVE. Written by DataEase 28/01/16 at 11:06:23

DQL - Setcurrent & Setstate

Dear allCan we use a "manip" field with the set of instructions as follows :setstate ("manip", 0 )+ SetCurrent("WindowBorder","NoEdge")+SetCurrent("WindowClass","Modal")+ SetCurrent("WindowPos","10","80"),in a body of a DQL proced...

Product: Dataease [{8}]FIVE. Written by afonso santos 13/06/16 at 22:44:45

Re:DQL - Setcurrent

Hi Afonso.You can't do it in body as the Body on the "old style DQL" is not properly part of the GUI system.However we did a test and you can do it from inside the DQL.Define "retval" text .retval :=&nbsp;SetCurrent("Window...

Product: Dataease [{8}]FIVE. Written by DataEase 14/06/16 at 20:05:40

I am currently running DataEase 5.62. Will I need anything more than DataEase 8.5, to migrate my data into DataEase 8.5?

[@EOF@]...

Product: . Written by Kelion Kopp 27/11/16 at 14:59:52

I am currently running DataEase 5.62. Will I need anything more than DataEase 8.5, to migrate my data into DataEase 8.5?

[@EOF@]...

Product: . Written by Kelion Kopp 27/11/16 at 14:59:52

Re:I am currently running DataEase 5.62. Will I need anything more than DataEase 8.5, to migrate my data into DataEase 8.5?

No.You only need to open the application in DE85 and it will automatically detect that it is a DE 6.x application.If the application has been developed on a windows that use , as decimal separator you should do back on the initial menu...

Product: Dataease [{8}]FIVE. Written by DataEase 28/11/16 at 12:59:26

SetCurrent(WindowBorder,NoEdge)

hiewhy is it that the statement below doesnt work on dataease player 8.5.0.2500, especially NoEdge and Modal. It works only on the Developer.setstate ("manip", 0 )+ SetCurrent("WindowBorder","NoEdge")+SetCurrent("WindowClass","Modal")+ S...

Product: Dataease [{8}]FIVE. Written by Godfrey 26/01/17 at 12:52:01

Re:SetCurrent(WindowBorder,NoEdge)

Download Sample We just tested this in 8.5.0.2500 and it seems to work excellent ;-)The...

Product: Dataease [{8}]FIVE. Written by DataEase 27/01/17 at 15:13:25

View users currently using DE

In version 6.52, before copying a database, I could view deconfig/configur.dat to see who was currently on the database. &nbsp;I'd then ask each to exit dataease&nbsp;so I could run a backup (copy the database). &nbsp;How can I see in Dataease 8.5 who...

Product: Dataease [{8}]FIVE. Written by Karen Miller 18/04/17 at 14:44:07

Re:View users currently using DE

Hi Karen.The way of controlling multi-users was changed in 7.0 as the way it was done in 6.x and before was very old fashioned and non-standard.The biggest drawback being the manual setup and configuration that caused a lot of problems...

Product: Dataease [{8}]FIVE. Written by DataEase 19/04/17 at 11:31:41

Using Player/Security Level/Custom FileMenu & SetCurrent() to tailor the user experience.

The best way is to use the Player instead of the developer.&nbsp; Download Player! <img style="width:100%" src="/static/ulimages/Capture...

Product: Dataease [{8}]FIVE. Written by DataEase 20/04/17 at 15:08:30

Copy a copy of database over current database

We made a copy of the current database. &nbsp;Then when we made changes to derivation formulas it threw junk into files. &nbsp;I want to delete the current database and use the copy of the database. &nbsp;It will not let me delete or change name. &nbs...

Product: Dataease [{8}]FIVE. Written by Karen Miller 19/05/17 at 18:03:55

Re:Copy a copy of database over current database

Hi KarenIs the folder name you want to change?If yes, and it is not letting you, then, it means that the operating system is seeing that the folders is still being used...which may mean the application is still open. &nbsp;Check for any...

Product: Dataease [{8}]FIVE. Written by Josef Vella 22/05/17 at 09:46:22

Run procedure based on current record view.

Hi all,I was wondering what the best way might be to run a procedure that selects data from the record I am currently viewing and not based on data criteria. In other words while viewing a record I want to click a button that will output dat...

Product: Dataease [{8}]FIVE. Written by Bolt-on-Trailers 13/10/17 at 21:36:01

Re:Run procedure based on current record view.

The best way of doing this is to use ExecDQL either LabelExecDQL or MemoExecDQLExecDQL can output directly to a file and you have 4 direct arguments in the function that will represent data-entry field1 through field4 inside the DQL.Al...

Product: Dataease [{8}]FIVE. Written by DataEase 14/10/17 at 10:41:53

SubForm+Getcurrent problems

Hi all,In my App i need to show a picture related with the product i'm listing in a subform.Using MouseOver event I've:define "xpos" number .define "ypos" number .act := setvalue("image",foto.value) .xpos := x...

Product: Dataease [{8}]FIVE. Written by afonso santos 19/11/17 at 16:22:17

Current User, Date, Time not changing/updating

Will you be able to help!One one of the databases I found that the current i.e. User, Date or Time not updating.&nbsp;However, on others it seem to work perfectly well.RegardsJoe...

Product: DataEase 6.x. Written by joe peart 22/11/17 at 20:30:24

Re:Current User, Date, Time not changing/updating

Can you give an idea in what circumstances this happens? In a form, report, etc? AS...

Product: DataEase 6.x. Written by afonso santos 23/11/17 at 00:03:02

Re:Current User, Date, Time not changing/updating

To preserver current Date, user etc. is a property of the Application. You simply go to Application Preferences and uncheck the "Preserve old CURRENT...

Product: DataEase 6.x. Written by DataEase 23/11/17 at 13:18:05

Re:Re:Current User, Date, Time not changing/updating

Sorry but that was the first place I thought of looking.Please find attached screen shot of my Application Preferences.What I also notice, if I check mark the box and close then go back, it unchecked itself. It never states checke...

Product: DataEase 6.x. Written by joe peart 24/11/17 at 10:54:05

Re:Re:Re:Current User, Date, Time not changing/updating

Hi Again Joe.If memory don't fail me the default for this was changed for applications somewhere along the lines. I was not around during the 6.x era but I...

Product: DataEase 6.x. Written by DataEase 24/11/17 at 10:55:24

Re:SubForm Getcurrent problems

No ideias about it ?ThanksAfonso...

Product: Dataease [{8}]FIVE. Written by afonso santos 27/11/17 at 00:09:26

Re:Re:SubForm Getcurrent problems

GoTo Sample Hi. Not sure what...

Product: Dataease [{8}]FIVE. Written by DataEase 27/11/17 at 09:32:34

?So you use CURRENT USER NAME instead of CURRENT COMPUTERNAME.

I guess that it strictly speaking is not our job to help you evade buying the correct number of licensing but if the only reason is that they need to identify themselves inside DataEase there is plenty of ways to do that...The simplest being to use di...

Product: Dataease [{8}]FIVE. Written by DataEase 09/03/18 at 18:06:01

On the blog about Current

New Function in 8 - GetCurrent() - Returns some long awaited values like AppPath, DePath and MyDoc (Ver. 8.0.0.1137)

DataEae has been a little "wobbly" on referencing external stuff like Images etc.There is an Imagepath in Application Preferences, but it has been rendered "defunct" so many times over the years, and nobody is really sure how it works anyway, s...

Product: Dataease [{8}]FIVE. Written by DataEase 26/09/12 at 07:53:14

DataEase 8 - Current Work Update!!

You might feel that it has been a little silent and not much have happened on the website lately, and you are right, but it is not due to us not being working.As you might be aware of we are still in heavy development and DataEase 8 is only in...

Product: Dataease [{8}]FIVE. Written by DataEase 14/03/13 at 11:21:26

Re:DataEase 8 - Current Work Update!!

MemoSetGlobal() and MemoGetGlobal()With the new Memo functionality we also need to be able to "throw" Memos about, so a new global array for Memo's is also on the current work list.Memos can't be a return value in PRISM so it...

Product: Dataease [{8}]FIVE. Written by DataEase 14/03/13 at 14:06:04

DataEase 8 - Current Work. Expanding Text field to 4080 characters.

We are currently implementing things to improve both current functionality and backwards compatibility. LongText One of the biggest problems for customers migrating from pre 7.x DataEase to 7/8 is the re-assignme...

Product: Dataease [{8}]FIVE. Written by DataEase 17/09/13 at 07:42:10

DataEase 8.2 - GetCurrent() updated! "RowNumber", "RecordNumber", "Version" (Ver. 8.2.0.1607)

Download Simple Sample GetCurrent() is the addition to the old and trusted Current from DFD. We have decided to add it as a function rather than continue on the built...

Product: Dataease [{8}]FIVE. Written by DataEase 21/08/14 at 12:10:10

DataEase 8.2 - WhatVersion function. GetCurrent("Version") (Ver. 8.2.0.1607)

Download WhatVersion? Sample We simply write up a little more specifically on this new "application parameter" as it kind of got lost in the other ones. GetCurre...

Product: Dataease [{8}]FIVE. Written by DataEase 25/08/14 at 18:17:03

DataEase 8.2 - GetCurrent updated with a lot of new features (Ver. 8.2.0.1665)

Download Sample GetCurrent() is our "jack of all trades" where we add useful info features. It already return RowNumber, RecordNumber, File positions etc.<...

Product: Dataease [{8}]FIVE. Written by DataEase 11/11/14 at 18:02:50

DataEase 8.2 - GetCurrent("Xpos" and "Ypos") for objects added (Ver. 8.2.1.1691)

Downlaod Updated PickLists App AIf you are familiar with our latest "play thing" MoveObject() you would also be aware that there has been some shortcomings. As...

Product: Dataease [{8}]FIVE. Written by DataEase 19/11/14 at 16:15:24

DataEase 8.5 - Function Update GetCurrent("@PrinterN") & SetState("@DefaultPrinter","PrinterName") Ver. 8.5.0.1790

Dedicated printing has always been a problem in Windows and particularly in DataEase for Windows.It was simple to direct output to a specified printer for a given report/procedure in DFD but in Windows "user interaction" has been the way, whic...

Product: Dataease [{8}]FIVE. Written by DataEase 05/06/15 at 10:35:09

DataEase 8.5 - GetCurrent() update - CPUID, MacAddress, MacAddressWIFI, MacAddresLAN (Ver. 8.5.0.1981)

GetCurrent() has been expanded again with new keywords.You are now able to read and use the CPUID and IDs of your network cards on the active PC.This is useful in your application to identify the Computer that runs your application.<br...

Product: Dataease [{8}]FIVE. Written by DataEase 01/12/15 at 15:00:10

DataEase 8.5 - New keyword in GetCurrent("AppDataPath"). Ver (8.0.0.2005)

GetCurrent("AppDataPath") will give you the path to the users local AppData.This is the area on your system where DataEase store information related to the current user/installation.Typical the path would be:c:\users\alexk\a...

Product: Dataease [{8}]FIVE. Written by DataEase 01/12/15 at 18:15:52

ScrollTo added to SetCurrent() - Force your document to scroll with programming (Ver. 8.5.0.2096)

Download Sample! Even though we are getting close to DataEase 8.5 Production release, the deve...

Product: Dataease [{8}]FIVE. Written by DataEase 08/01/16 at 14:24:52

Extension to GetCurrent() Find the xpos/ypos of the scrolled window (upper left corner) (Ver. 8.5.0.2096)

Download Sample We have extended the sample used in the previous post to include a Timer(Event...

Product: Dataease [{8}]FIVE. Written by DataEase 08/01/16 at 15:37:13

How to highlight active record in a subform by using GetCurrent("RowNumber"), SetStyle(with * and #) and GotFocus/Mousdown.

Download Sample We got a very good question o...

Product: Dataease [{8}]FIVE. Written by DataEase 28/01/16 at 11:26:05

DataEase 8.5.0.2291 - GetCurrent("OSVersion") and GetCurrent("OSInfo") added.

New keywords to GetCurrent added to make it possible to find out what Operating system you are running and if the operating system is x64 or x32.GetCurrent("OSVersion") will return the version of your operating systems. Due to changes and limi...

Product: Dataease [{8}]FIVE. Written by DataEase 15/07/16 at 18:10:08

GetCurrent("ScientificTime") added to GetCurrent() to give better precision for timers (Ver. 8.5.0.2500)

Download Sample When DataEase was introduced back in the early 1980ies computers where so slow th...

Product: Dataease [{8}]FIVE. Written by DataEase 08/09/16 at 11:07:37

DE8.5 - How to make generalised Language Version with ExecDQL and GetCurrent() etc.

Download Sample How to create language versions of documents has been discussed before. How to acheive t...

Product: Dataease [{8}]FIVE. Written by DataEase 09/06/20 at 18:50:01