-
- 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
Update data definitions
To update you have to use PUT.
The best way of updating is to first read the original by using GET, then make your changes to existing fields and add new by creating a new object in fdef array and the call a PUT /definition/table/tablename to the server.
var tdf = { "tdf": { "fdef": [ { "derived": "sequence from 00001", "escname": "ID", "hasindex": "yes", "isreqired": "yes", "isunique": "yes", "isvirtual": "no", "length": 5, "name": "ID", "preventedit": "yes", "readsec": "Low3", "type": "text", "writesec": "Low3" }, ..... more of the same ], "tablecreatesecurity": "Medium3", "tabledeletesecurity": "Medium3", "tabledopreservedataonmodify": true, "tablemodifysecurity": "Medium3", "tableviewsecurity": "Low3", } }; var tname="NewTest"; var options = { url: "/definition/table/" + tname + "/", type: 'PUT', contentType:'application/json', data: JSON.stringify(tdf), dataType:'json' }; $.ajax(options).done(function(jdata,status,xhr){ if (jdata.result == 'ok'){ // Do what you need to do after update } });
Ex. of updating a table by javascript in web page using jquery.