-
- 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
into
Type
Processing CommandPurpose
The input using command provides all the facilities of record entry but allows DQL to process records before they are entered into the database. It can be used at any point in a procedure.Syntax
input using FORMNAME into "TEMPFORM" .
In the input using command syntax, FORMNAME is the name of a DataEase record-entry form. TEMPFORM is the name DataEase uses to reference an input record. You can assign any name you want for this purpose except the name of a form in the same application. The first time that the TEMPFORM name is specified in the script, it must be enclosed in quotation marks.
There is no limit to the number of input using commands you can use in a script; however, each DataEase form must be assigned a unique TEMPFORM in the input using statement.Usage
The input using command tells DataEase to display a specified record entry form. When the specified form is displayed, you can either enter or modify a record (in Form View), or scroll through the form (in Form or Table View) and select any existing record. You can also use the Goto>>Related Form menu option (or F10 key) to view records in related forms.
When you press a processing key (CTRL-F4 EXIT, F2 SAVE, F7 DELETE, or F8 MODIFY), the input record is copied into memory and a number that corresponds to the processing key is stored in the current status variable. DataEase then resumes processing the procedure, using the input record data just like values entered in a Data-entry form. The current status value can be used to control subsequent processing. The table below summarizes the current status values returned by each processing key:
This Key Performs This Action And Returns This Value
CTRL-F4 EXIT 1
F2 SAVE RECORD 2
F8 MODIFY RECORD 3
F7 DELETE RECORD 4
Like a Data-entry form, the input using command is used to enter data for use in a procedure (rather than to permanently store the data in a table in the database). Unlike a Data-entry form, however, more than one input using statement can be used to enter data at any point during a procedure.
The input using command can only hold one record in memory at a time for a given TEMPFORM name. Therefore, if you want to save the contents of an input record, you must use the enter a record command in the script to save the current record before processing another. Example 2 demonstrates the use of the input using command and current status variable within a loop to process multiple records.
Because input using can only hold one record in memory, the form must be displayed in Form View when a processing key is pressed. Table View is used for selection purposes only.Example 1
input using MEMBERS into "TEMPMEMBER" .
for RESERVATIONS with (MEMBER ID =
TEMPMEMBER MEMBER ID) ;
list records
RESERVATION ID ;
TOTAL DUE ;
DATE .
end
This query tells DataEase: 1) Display the MEMBERS form 2) When the user selects a specific MEMBERS record and presses F2, store that record in memory (using the name TEMPMEMBER to reference it). 3) Find all the RESERVATIONS records with the same MEMBER ID as the MEMBER ID in the TEMPMEMBER record. 4) For each related reservation, list the RESERVATION ID, the TOTAL DUE, and the RESERVATION DATE.Example 2
while current status not = 1 do
input using MEMBERS into "TEMPMEMBER" .
case (current status)
value 1 : break .
value 2 : enter a record in MEMBERS
copy all from TEMPMEMBER .
value 3 : modify records in MEMBERS with
(MEMBER ID-2> = TEMPMEMBER MEMBER ID)
copy all from TEMPMEMBER .
value 4 : delete records in MEMBERS with
(MEMBER ID = TEMPMEMBER MEMBER ID) .
end
end
The script in Example 2 tells DataEase: 1) Display the MEMBERS form. 2) Each time the operator enters a record and presses a processing key (CTRL-F4 EXIT, F2 SAVE, F7 DELETE, or F8 MODIFY), check the value of the current status variable. If current status = 1 (the user pressed CTRL-F4 EXIT when the input record was on the screen), stop script processing without entering a record in the MEMBERS table. If current status = 2 (the user pressed F2 SAVE when the input record was on the screen), copy the input record into the MEMBERS table.
If current status = 3, (the user pressed F8 MODIFY when the input record was on the screen), modify the record in the MEMBERS table with a MEMBER ID (a Unique field) that is the same as the MEMBER ID on the input record. If current status = 4, (the user pressed F7 DELETE when the input record was on the screen), delete the record in the MEMBERS table with a<P8M> MEMBER ID (a Unique field) that is the same as the MEMBER ID on the input record. 3) Display the MEMBERS form again so the operator can enter, modify, or delete another record.Example 3
while current status not = 1 do
input using MEMBERS into "TEMPMEMBER" .
case (current status)
value 1 : break .
value 2 : if TEMPMEMBER MEMBER ID <= 20000 then
enter a record in MEMBERS
copy all from TEMPMEMBER .
else
message "Invalid ID. Re-enter the record." .
end
others : message "You are not authorized to modify or delete records." .
end
end
This script tells DataEase: 1) Display the MEMBERS form. 2) Each time the user enters a record and presses a processing key, check the value of the current status variable. If current status = 1 (CTRL-F4 EXIT), stop script processing without entering a record in the MEMBERS table. If current status = 2 (F2 SAVE), verify that a valid MEMBER ID (<= 20000) was entered in the input record. If it is valid, copy the input record into the MEMBERS table. If it is not valid, display an error message. If current status = 3 or 4 (F8 MODIFY or F7 DELETE), display a message telling the user that he/she is only authorized to enter records. 3) Display the MEMBERS form again so the user can enter another record.
Using the input using Command with Multiforms
When using the input using command on a Multiform, DataEase treats Main forms and Subforms differently. If you enter, modify, or delete a Main form record, the information is copied into the specified temporary form where it can be validated and processed by the script.
If you enter or modify a Subform record, however, the new or modified record is entered directly into the Subform in the database. This is because DataEase is unable to hold all of the entered or modified Subform records in memory (up to 5000 Subform records can be entered or modified at once) and still continue processing the script.
If the user presses F2 SAVE to enter a Multiform record, you can use enter a record to enter the record into the Main form (the Subform records were automatically entered when the user pressed F2). If the script tests the Main form for validity (e.g., MEMBER ID >= 20000 in Example 3) and it fails, you must use the delete records command to remove the Subform records that were entered when you pressed F2 SAVE.
If the user presses F8 MODIFY to modify a Multiform record, you can use modify records to modify the Main form record. (the Subform records are automatically modified when the user pressed F8). If the script tests the Main form for validity (e.g., MEMBER ID >= 20000 in Example 3) and it fails, it is up to the user to remember which Subform records were modified and then go back to the Subform and undo the modifications. DataEase cannot automatically undo modified Subform records.
If you delete a Multiform record using the input using command, the records are not directly deleted from the table. You must use the script to verify that a valid record was entered and then use delete records to explicitly delete the appropriate Main and Subform records.Example 4
while current status not = 1 do
input using RESERVATIONS into "TMP RESV" .
case (current status)
value 1 : break .
value 2 :
if TEMP RESV RESERVATION ID <= 50000 then
enter a record in RESERVATIONS
copy all from TMP RESV .
else
message "Invalid ID. Re-enter the record." .
delete records in RESERVATION DETAIL
with (RESERVATION ID =
TMP RES V RESERVATION ID.
end
others : message "You are not authorized to
modify or delete records. If you have
modified records, you must manually
delete the modifications." .
end
end
This script tells DataEase: 1) Display the RESERVATIONS form. 2) Each time the user enters a record and presses a processing key, check the value of the current status variable. If current status = 1 (CTRL-F4 EXIT), stop script processing without entering a record in the RESERVATIONS table. If current status = 2 (F2 SAVE), verify that a valid RESERVATION ID was entered in the input record. If it is valid, copy the input record into the RESERVATIONS table. If it is not valid, display an error message and delete the records that were automatically entered in the Subform (RESERVATION DETAIL). If current status = 3 or 4 (F8 MODIFY or F7 DELETE), display a message telling the user that he/she is only authorized to enter records. 3) Display the RESERVATIONS form again so the user can enter another record.
Using the input using Command with Views
DataEase (version 5.12 and later) enables you to do a DQL Input Using with any forms, including those which do not own their own tables, also known as "Views". Previous versions of DFW only allowed you to perform an Input Using with documents that defined tables. This new functionality gives you greater flexibility and security by allowing you to create procedures which will bring up only the information you want your users to have.
Syntax
The syntax for input using with Views is:
input using <tablename> into <"tempname"> via form <formname> .
where formname can be any form document that uses the tablename. If the form specified does not exist an error message will display at runtime and the table will be opened instead in field/line mode. If the form specified does exist but it does not use the specified table an error message will display at runtime and the table will be opened instead in field/line mode.
If an input using command is performed without the ''via form" it will be executed as usual, i.e. the form with the same name as the table will be opened.