-
- Preview browser
- Page designer
- DQL editor
- Application wide settings
- Security settings
- Page caching module
- Modules
- Snippets
- Actions
- Context editor
- Task editor
- Scheduler editor
- Search engine editor
- Web server console
- Site layout editor
- Template editor
- Robots editor
- Style definitions
- Database manipulation
- Table designer
- Transfer editor
- Reporter
- Deployment module
- Deployment server settings
- Debugger
- .end
- .form header
- .form trailer
- .items
- assign
- application status
- backup db
- begin transaction
- break
- call menu
- call program
- case
- cluster by
- commit
- connect
- copy all from
- data-entry
- db status
- delete records
- define
- disconnect
- do
- documents
- exec SQL
- else
- end
- enter a record
- error messages off
- error messages on
- exit
- export
- for
- global
- if
- import
- imports
- in
- input using
- install application
- into
- list records
- lock
- lock db
- modify records
- message
- named
- others
- prompt
- query selection
- record entry
- records
- reorganize
- restore db
- rollback
- run procedure
- servers
- temp
- then
- tran off
- tran on
- unclustered
- unlock
- unlock db
- via form
- while
- with
- abs
- acos
- addressof
- ampm
- anylookup
- asin
- atan
- atan2
- ceil
- CHR
- concat
- ConsoleCopy
- ConsoleMemoCopy
- ConsoleShow
- ConsoleWriteToFile
- cos
- cosh
- date
- DatePicker
- day
- DEOS
- DialogOpen
- DialogOpenRelated
- DocumentCloseName
- DoesObjectExist
- ExecDQL
- ExecuteFile
- exp
- FileExecDQL
- firstc
- firstlast
- firstw
- FixedWidth
- floor
- futurevalue
- GetCurrent
- GetVar
- hours
- if
- installment
- jointext
- julian
- lastc
- lastfirst
- lastw
- length
- log
- log10
- lower
- MemoChunk
- MemoCopy
- MemoDecodePair
- MemoExecDQL
- MemoFind
- MemoGetGlobal
- MemoLength
- MemoMemoCopy
- MemoMemoReplace
- MemoReadFromFile
- MemoReplace
- MemoSetGlobal
- MemoStringBetween
- MemoStringFrom
- MemoStringTo
- MemoWordCount
- MemoWriteToFile
- midc
- midw
- minutes
- mod
- month
- OpenForm
- OpenMenu
- OpenProcedure
- OpenReport
- periods
- power
- presentvalue
- proper
- random
- rate
- RefreshForm
- RefreshScreen
- RefreshStatus
- Remote
- Remote authentication
- Remote POP3
- Remote IMAP
- Remote SMTP
- Remote XML
- seconds
- SetColor
- SetCurrent
- SetFocus
- SetLabelText
- SetMemoValue
- SetState
- SetStyle
- SetValue
- SetVar
- sin
- sinh
- spellcurrency
- spelldate
- spellmonth
- spellnumber
- spellweekday
- sqrt
- StringBetween
- StringEscape
- StringFind
- StringFrom
- StringReplace
- StringTo
- tan
- tanh
- textpos
- timeampm
- ToText
- UniqueID
- upper
- Wait
- weekday
- WriteToFile
- year
- yearday
- yearweek
- " (quotation marks)
- () (parentheses)
- + (addition)
- , (comma)
- - (subtraction)
- . (period)
- -- (comment)
- / (division)
- * (multiplication)
- * (asterisk)
- ? (question mark)
- ~ (tilde)
- : (colon)
- := (assignment operator)
- ; (semicolon)
- < (less than)
- <= (less than or equal to)
- = (equals)
- > (greater than)
- >= (greater than or equal to)
- all
- all files
- and
- any
- between
- blank
- count
- count of
- file
- highest of
- in groups
- in groups with group-totals
- in order
- in reverse
- item (Statistical)
- item (Conditional Statistical)
- lock files
- lock nothing
- lock records
- lookup
- lowest of
- max
- mean
- mean of
- min
- not
- number
- numeric string
- or
- pause
- percent
- selected record
- std.dev.
- std.err.
- sum
- sum of
- text
- time
- to
- variance
- window
- Rules for queries
- * (asterisk)
- ? (question mark)
- ~ (tilde)
- and
- or
- not
- ( ) (parentheses)
- Debug querys
- Livetext tags
- xdg3 query
- Sessions
- Pagination
- Free text search
- Intro on fields
- Text
- Hidden
- Date
- Dropdown
- List
- Checkbox
- Radio button
- Text edit
- Redactor (richtext)
- CKEditor
- TinyMCE
- Intro
- hasPrismConnection
- doAction
- doDerivation
- doMenuItem
- doPrismDerivation
- setFormField
- runPrismFunction
- @GetDefinition
- . document
- . listcommands
- . listdocuments
- . listdrives
- . listfiles
- . listfunctions
- . listinternals
- . listoperators
- . listrelated
- . listtables
- . object
- . table
- . testdql
- @SetDefinition
- . document
- . object
- Extra modules intro
- python
- Qt
- wkhtmltopdf
- PySide
- PyXCC
- django
- Apache
- LightTPD
- nginx
- pywin32
- flup
- cssutils
- Pillow
- psutil
- mysqldb
- psycopg2
- pyodbc
- python_dateutil
- requests
- suds-ews
- setuptools
- Whoosh
- wmi
- django-send
- bootstrap
- bootstrapmultiselect
- jquery
- jqueryui
- ckedit
- tinymce
- redactor
- JavaScript EU VAT Number Validation
- feedparser
- beautifulsoup
- appsdir
- six
- pycparser
- pyOpenSSL
- cryptography
- cffi
- enum34
- pyasn1
- idna
- ipaddress
- PyYAML
- coverage
- coveralls
- docopt
- mock
- funcsigs
- pbr
- nose
- paypalrestsdk
- paypal
- libcurl
- 7zipcpp
- cef
- cpp-jwt
SetVar
Function::Internal
SetVar
SetVar(String,String)
SetVar("MyVariableName","MyValue")
SetVar("MyVar",MyField)
retval := SetVar("VarName",Result) .Set any named global variable anywhere to be used anywhere in an app within the same session.
There has been several CDF libraries that has tried to tackle this need over the more than 30 years DataEase have been around, but for some strange reason DataEase itself has never seen the need for implementing this very useful and necessary feature - before now.
The CDF libraries that has offered this service have all had the weakness that they have numbered the variables and also have a limited supply of them. For instance SetArray() has only 10 and SetGlobal() only 100.
SetVar is "unlimited" and you can name them.
One avid and long-standing user has pointed out that it was quite useful to use numbers for the variables as you could then loop through and name them automatically, but you can of course still use number or a combination of text and numbers as DataEase automatically convert between formats. See Examples below.
Parameters
Variable Name: String
This is the name you want to give the variable it can be concatenated like this concat("MyVar",Counter) or you can use a date, number etc.
Value: String
The value you want to put into the global variable. It can be anything and it will be automatically converted to string, and converted back when read by GetVar()
Returns/Result
Nothing. This is the standard for most new functions so they can be added in chains without impacting the result.
ExamplesExample 1
SetVar("MyStyle",GetStyle("MyButton") -- This will read the stylename of button my button and put it in the Global variable MyStyle.
You can now reset the button to original style by using:
SetStyle("MyButton",GetVar("MyStyle"))Example 2
Define "counter" number .
Define "Retval" text .For MyForm ;
Retval := SetVar(concat("MyVar",Counter),CustomerName) .List records
CustomerName .
This example will generate a numbered variable for each customerName, but it would maybe be better to use for instance CustomerNr as the name for the variable.
Define "counter" number .
Define "Retval" text .
For MyForm ;
Retval := SetVar(CustomerNr,CustomerName) .List records
CustomerName in order ;
CustomerNr .You will now be able to retrieve the value of the Global variable by referncing with the CustomerNr.
Reference
As part of the DataEase for Windows restoration project we have come to a big omission in DataEase - Global Variables or transfer of information between processes if you like.It amazes us how many wishes, needs and wants from almost every user, that has been blatantly ignored by "us". We have had no qualms in brushing off desperate user with a CDF or a receipt long as your arm to "fix" a problem in our product.
In DataEase 8 we have deemed to remedy a lot of these omissions. It might be too late for a lot of users, but that excuse is getting to old too. When we took over development we were told that yes LegEasy DOS is how it should have been done back in 1994 but alas, now it was too late.
Bull...it. We can't hide behind "too late". It is only too late if we think that DataEase will ever be used by people that have already used it, but our goal is to get it to be used by people that have never used it too.
Just because there is some CDF's that can transfer a limited number of variables, and there is an SQL return code that one can use for the same, doesn't mean that the problem is solved. Especially not when we are going to tell you all to not use DQL body for printing.
What? Not using DQL body for printing, not using DQL for printing? No! It doesn't work, and it never have. It is the achilles heel of DataEase for Windows and a couple of hours working with it is enough to kill the spirit of the bravest.
DQL without Printing is both effective and amazing, but the way the body has been implemented is just backwards.
I can guarantee you that nobody that make a living from using DataEase use the DQL body for anything. So if you are a new user, don't even try.
The fact that the Data-Entry form is as limited doesn't make the situation any better.
Use DQL for processing, and use Report for printing! End of story!
The only reason we use DQL for printing is that that is what we used to do in DFD, and the reason we used to do that in DFD is because we need to have a data-entry form.
In DataEase 8, we have introduced Virtual Editable Field so you can make a DataEntry form as a normal for with relationships etc. Then you use the new SetGlobal("Variablename",Value) to set the global variables either in a virtual field or directly on the button that Fire the Report. In the report you set the Filter and use GetGloal("Variablename") and the job is done.
With Set/GetVar() you can have as many global variables as you like and you can give them descriptive names.
You can of course use them for anything you like, the above is just an example.
SetVar("MyVariable",Field1)