-
- Form goals
- Auto form
- Setting up autoform
- A single form
- Form with subform
- Form actions
- Call script after startup
- About Update
- Using tools
- 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
Installation deprism9
To use denode library you need to install a windows 32-bit version of node form https://nodejs.org/en/download/ by using the msi installer. Default path should be C:\Program Files (x86)\nodejs and let node be added to the path to make thinks simpler for your self. If you plan to use many different version have a look at getting node version in Appendix A.
One time setup before you can use our packages
Before you install any pacages, you need to set up a scooped connection to our npm packages. This is a one time for each computer you plan to use any of our packages.
npm config set @dataease:registry=https://setup.2imply.com/jspackages
This will set up the @dataease scoope that you will use to get any of our pagages.
Set up project to use denode9
To create a new node app for using denode9 and start it in vscode.
mkdir myapp cd myapp npm init -y code .
To install the node api for prism (denode9):
npm install @dataease/denode9
If this is the first use of the module, you must also copy the given $4tp$.key license file into the directory given in your prisminit function call.
The api can only be used with LE9/DE9 applications as this is the version of prism supported by denode9 package.
After this you simply need to initialize and use the library like this
const {prism, prisminit, Repo} = require('@dataease/denode9'); let repo = null; let res = prisminit('C:\\ProgramData\\ds2imply'); if (res){ console.log('Prism started using license: ' + prism.runfunction("DEOS", "@getlicense")); repo = new Repo(); const res = repo.openrepo('HeaderFooterSizeToFit', 'C:\\Data\\UlrikTests\\HeaderFooterSizeToFIt'); if (res === true){ let tables = repo.listtablenames(); console.log(tables.join('\n')); let ws = repo.createmultiview('World Cities'); repo.closerepo(); } else { console.log('Error code: ' + res); } } else console.log('Prism failed to start'); prism.prismclose();This will first load the module and create a connection to prism. Prism need to know where the license is, so we add a license path prisminit. Then we create and open a repository. After this you can use multiviews and dqls in this repository using the api commands. When finish, make sure to close repo and shut down prism.
For debug, set your breakpoint and simply choose to launch node.js.