-
- About server
- LegEasy Connect
- Dev server
- Live Server
- DERun
- Hello world
- Call script after startup
- Using tools
- Authentication
- Custom authentication
- External authentication
- Basic authentication
- Folder Security
- Data manipulation
- Read one record
- Read many records
- Write one record
- Delete one record
- Direct Page/DQL
- Page data definition
- Directory listing
- File handling
- Prism lists
- Data Defintions
- Get data definitions
- Create data Definitions
- Update data definitions
- Delete data definitions
- Definition format
- A web page
- Page definition
- DQL pages
- Single file/memo DQL
- Single file/memo Page
- LiveText tags
- Url commands
- Tags
- How data is triggered in a page
- Form goals
- Auto form
- Setting up autoform
- A single form
- Form with subform
- Form actions
- About Update
- About DataEaseConnect
- checkquery
- callbacksuccess
- clearrecord
- connectonfieldchange
- convertvaltonumber
- decodequery
- deletedata
- deletetdf
- displayerrormsg
- doaction
- ensurequry
- fetchrecord
- fetchrecords
- finddatatype
- findfieldindef
- formdata
- formdefs
- forminit
- forminitdone
- formloaded
- generateid
- getcookied
- getdata
- getelement
- getfield
- getmyhost
- getnumlines
- getrecordcontent
- getrecorddef
- getrecordnofromurl
- gettdf
- gettablefromurl
- istrueval
- login
- logout
- makenewline
- multirecordinit
- newdata
- newtdf
- rundql
- populateoneselect
- selectpopulate
- setcsrfheader
- setelement
- setfield
- singlerecordinit
- stringify
- stripsuffix
- updatedata
- updatetdf
- useisodatetime
- usenumber
- version
- About decommon.js
- The loader
- calccaretpos
- decodequery
- generateid
- insertitem
- loadfilelist
- loadfile
- loadinternals
- message
- rundql
- runpage
- savefile
- selectitem
- testdql
- version
- About jsBridge.js
- Action names
- deCheckVersion
- DEOS
- getnumlines
- GetCurrent
- GetValue
- GetVar
- jsAction
- jsActionExt
- jsActionExt2
- jsAddClass
- jsDEOS
- jsDerivation
- jsDerivationDebug
- jsDocumentDelete
- jsDocumentEdit
- jsDocumentOpen
- jsExecDQL
- jsGetActiveDocState
- jsGetVar
- jsGetCurrent
- jsGetDocumentState
- jsGetValue
- jsGetPRISMValue
- jsHide
- jsInt21
- jsLiveText
- jsLog
- jsMemoExecDQL
- jsMenuItem
- jsNewBlankForm
- jsOpenAppCat
- jsPrismDerivation
- runPrismFunction
- jsRefreshDocuments
- jsReorganize
- jsReorganizeAll
- jsRemoveClass
- jsSetFixedValue
- jsSetVarFromField
- jsSetValue
- jsSetVar
- jsSetCurrent
- jsSetWebField
- jsSetWebFieldFromVar
- jsShow
- jsToggle
- jsToggleClass
- makenewline
- SetCurrent
- SetValue
- SetVar
- startdebugger
Read many records
To read several records at once, you must have rights to the data and use the listdata url to fetch them using a http GET command. The format of the url is; /listdata/tablename/startrecno/endrecno/?dataeasequery&field1=val1&field2=val2 etc.
/listdata/ tells the server to give you all selected records between a start and end record
/tablename/ tells what table to fetch the data.
/startrecno/ is the start record to be the first to fetch
/endrecno/ is the end record to be the last tofetch
The start and endrecno is optional. If no start and end is set the first 100 is listed. If only a start is set, the end is automatically start + 100.
The query format is the same as for any other query in server. The first part between ? and the first & is a query as your write it in DataEase. This mean you can write a Name="A*" to get all records with a text field starting on A. You can also use all other operators like AND, OR, BETWEEN, >, >=, <, <=, =, not = etc. So if you want a record where Name starts on A and regdate is between to dates your write "Name="A*" AND regdate between 10/10/20 to 12/10/20". If you want to get the results in acending or decending order based on a field, you add this as "®date=in order".
Ex. /listdata/Address/0/?Name="A*" AND regdate between 10/10/20 to 12/10/20®date=in order&jsonpretty=1&getrecordcount=1
This query will return all records record matching Name="A*" and reg date between the 10/10/20 and 12/10/20 in acending order on regdate is formatted json and also add the number of record matched to the result
Valid extra query parameters that can be used can be found here.The return format is application/json withe the following format:
When no error occurred: { 'result' : 'ok', 'listdata' : [ { 'Name' : 'Bjorn', 'Country' : 'Norway', 'Street' : 'Engveien 2', 'Postno' : '1234', 'PostAddr' 'Nowhere' }, { 'Name' : 'Bjarne', 'Country' : 'Norway', 'Street' : 'Narhvalveien 5', 'Postno' : '4321', 'PostAddr' 'Somewhere' }, ], 'startrecno' : '0', 'endrecno' : '1', 'rows' : 2, 'table' : 'Address' } When error occurred { 'result' : 'error', 'errormsg' : 'no record matching query' }