Function::Internal

GetCurrent
GetCurrent("AppPath")
GetCurrent("ProgrPath")
GetCurrent("MyDocuments")
GetCurrent("RowNumber")
GetCurrent("RecordNumber")
GetCurrent("Width"[,"ObjectName(Optional)"])
GetCurrent("Height"[,"ObjectName(Optional)"])
GetCurrent("WindowState")

The GetCurrent() functions is closely related to the old Current functionality in DataEase and is an addition to the existing Current values up to and including 7.2.

The New GetCurrent() function is a function to retrieve current information from DataEase. The first increment returned paths to different parts of the DE structure, then we added features for navigating in the Form to help with setting and getting information on objects and now we are adding features to get information on the forms.

The new GetCurrent functions are all File paths and are included to make it easier to navigate from inside a DataEase App.

Everything from Images, to files, documents, exports etc. can be located in a dynamic structure and up to now it has been impossible to address them "relative" to the Application, to the installed DataEase or to the users My Document structure.

The time when DataEase was installed on C:\DEASE and the app was in the program catalogue is long gone, and we now need to be able to navigate freely on different installations.

Parameters

activedocstate Return the mode the active document is in. Can be RT, DT, SE, PR, QM or NA.
activetabname
ActiveWindow Returns the currently active window handle.
AppDataPath Returns the users app data path used by DataEase. This us usually C:\Users\YourUserName\Local\DataEase\DataEaseWithVersion
Params
- [pathending] can be with og wihout and will make sure you either has a \ or not
appdateseparator The date separator used by this app.
appdatestandard The date standard used by the app. This can be MM/DD/YY (used by North America) or DD/MM/YY (used by most of the western Europe and therefor called International) or YY/MM/DD (also called Metric due to it actually sorts right)
appdecimalseparator The decimal separator uses by this app.
AppLetter Return the letter used by the application in RDRRxAAA.INI (the x) and similar places.
applicationheight

applicationwidth

AppName This will return the current Application Name
AppPath This will return the full path to the current application.
Params
- [pathending] can be with og wihout and will make sure you either has a \ or not
apptimeseparator The time separator used by this app.
apptripletseparator The seperator used fro triplets in application.
AppStyleFileName Returns the full file path of the style set on the application.

AppUserTemp
LE9 >= 6582

Return the temp folder used for DataEase temp files when generating big multiview data. Can be used for your own temporary data as a user will have this folder created and it will be writable.
CatalogDirty Returns "yes" if a operation that needs a catalog refresh has been done like New document or Delete document. Reset with SetCurrent("CatalogDirty", "no").
ComputerName Returns the name of the current computer
cpuid
dataentryfields
return a list of data-entry fields in current dql as JSON
DEName
Get the name PRISM used for network operations. Can be set by enviroment, prism.ini [LOCKING] and DEName= or automatically generated based on logged in user and computer name.
DeveloperVersion The newest version the developer have opened the application in.
DocFileName This will return the filename of the current document. Typical MYDOCAAA.FRM.
DocName This will return the name of the current document. I.e. The saved name of the Document.
DocStyleFileName Returns the full file path of the style file used by the document.
DocStyleIsDirty Return yes if currents documents style has been changed and not saved. Return no if not.
editorcaretpos

editorlinecount

editorlinetext

editorstartlinepos

editortext

editortextlength

Environment
Return the environment variable for the second paramrter
ExeFileName This return the filename used to start dataease.
FieldName Returns the column name of the current object
FieldType Returns the column type of the current object
firstrecordonscreen
getrecordsinform
getgecordsinformhor
getrecordsinformvert
Height [,Object] This will return the height (available space in window for form i.e. inside hight) of the active window. If you add an objectname it will give you the height of the Object rather than the Main WIndow. Format then would be: GetCurrent("Height","MyObject")
ieenhancedsecurity Is Internet Explorer enhanced security turned on. Return yes if it is.
inipath

Return app ini without any parameters

Parameter

- initype | de = dataease.ini path, app=rdrrxaaa.ini path, user=user.ini paht

isonscreen
isvisible
LicenseNr Returns your license number
LoginName The email address the user used to validate the License when starting up DataEase
macaddress
macaddresslan
macaddresswifi
MachineGuid Unique key that each windows computer have
MyDocuments This will return the full path to the root of the users My Documents structure.
Params
- [pathending] can be with og wihout and will make sure you either has a \ or not
ObjectName Currently selected objects name
ObjectType Currently selected object type
ObjectValue Currently selected object value
ObjectStyle Currently selected object style
osinfo
osversion Text version of os
osversionmajor Internal version of os major version
osversionminor
osversionbuild
osversionproducttype
osversionpatchmajor
osversionpatchminor
osversionsuitemask
Product Returns the product type from prism. Can be Pro, Developer, Player, Development server, Server, DG3 or Custom at the moment.
ProductExpiry Return the lowest expiry date form any expiry date in the form DD/MM/YY or blank if none set
ProductLicenseExpiry
The expire data set in the license key. Returns DD/MM/YY or blank in none set
ProductHardExpiry The date set for the expire date in code. This is used for time limited betas. Returns the format DD/MM/YY or blank if none set
ProductSoftExpiry The expire date set on the license server if any. Returns blank or a date in the format DD/MM/YY
ProductStatus Return Beta or Release based on if we have a hard expire date compiled into the code.
ProgramDataPath Returns the path to the catalog where license key and autostart apps are stored. Usually "C:\ProgramData\DataEase\DataEase version"
Params
- [pathending] can be with og wihout and will make sure you either has a \ or not
ProgrPath This will return the full path to the DataEase internal files.
Params
- [pathending] can be with og wihout and will make sure you either has a \ or not
RecordNumber This will return the current Record number in current Multiview. DataEase do not do absolute record numbers, but the position in current cursor called Multiview in DataEase terminlogy. If you have done a search that gave 100 returns the last row will report 100 and the first 1.
RowNumber This will return the current Row in a Subform or in a MultiForm. It will always report the same number for the same row.
rownumber1
scientifictime Total milliseconds since epoc
servicewindowinfo
systemprinter
UserDataPath Returns the path to where user specific data like user.ini are stored. Usually something like "C:\Users\me\AppData\Local\DataEase\DataEase version"
Params
- [pathending] can be with og wihout and will make sure you either has a \ or not
UserName Returns the currently logged in user on the computer
Version Return the version number in the for major.minor.patch.build Ex 9.0.0.4567
Width [,Object] This will return the width (available space in window for form i.e. inside width) of the active window. If you add an objectname it will give you the width of the Object rather than the Main WIndow. Format then would be: GetCurrent("Width","MyObject")
viewxpos
viewypos
Windowname This will return the name (caption) of the current Window (Form, Report etc)
WindowState This will return the current State of the window: Maximized, Normal, Minimized.
Xpos [,Object] This will return the Xpos of the Object. If no Object is specified it will return the Xpos of the current Parent Object. GetCurrent("Xpos","MyButton").
Ypos [,Object] This will return the Ypos of the Object. If no Object is specified it will return the Ypos of the current Parent Object. GetCurrent("Ypos","MyButton").
None of above
Return the corresponding environment variable

Returns/Result

TEXT VALUE
The full path to the designated parameter.

Examples

Example 1

We have a picture archive where the images are stored in My Pictures under My Documents, and the images names are stored and organised in a DataEase application. The Image name is stored in the field Image and we want to display a preview in an ImageField.

concat(GetCurrent("MyDocuments","/My Pictures/",Image)


As simple as that ;-)

Example 2

This is a slightly more advanced example that is taken from the Example - Send Advanced E-Mail in the Default Template in DataEase 8.

Her we have a button that open a file dialogue and point it on My Documents, when the user hit OK, the file name is appended with MemoCopy() to a Attachment field.

MemoCopy(Attachments,concat(GetFileName("","",GetCurrent("MyDocuments")),","),0)