There are several ways of running dqls in the server.

  1. Write a dql in the page/template/element by starting it with .dql at top part of the page. The end of the dql is the next .command
  2. use definition to test or run dql by /definition/testdql or /definition/rundql when you are logged in as a superuser with High as level
  3. use the /run/dql/dqlname command where the level set in the dql will determine who can run it
  4. use execdql in any of the others

The page dql

This can be run as part of any page. There is a whole chapter of how this work later in the book.

The definition based dql commands

This way of testing and running dqls can be done with any dql code that you might have. There is no need of storing the dql in any way like the others. To be able to run a dql in this way you must be logged in with a user that have the user level set to 1 (High).

To test a dql and get bat data-entry used and the tdf for output you can call /definition/testdql with GET, PUT or POST verb. The first expect a url encoded query string named code and the two others expects a payload of json where there is a key named code. This command will return a json with result:"ok" if it compiled right result:"error" if not. But will also have a jdata.dqldefinition.default key with the dql defitions.

All ok definitions

A string list of data-entry that is used by the dql. Ex. ['field1','fname'] is two data entry in use. To send it to this dql you have to add ?&field1=val&fname=val2
A multiview definition of the output from the dql. This is a array of definitons. In each of them you will find fdefs Ex. jdata.dqldefinition.default.multiview[0].fdefs gets the first field definitions

Error definitions

A message telling what was wrong.
The error code returned by prism
The position where the error was found in the code.
Take 100 char of the code and show where in the code the error was.

The run dql path

To run a dql in the server, it has to be store it in WebServer (or other defined places) and it will be looked up by the name. It has to be assigned a user level needed to run. If not the level Medium3 will be set.


The exec dql can be used in any of the other dqls. It work the same way as classic execdql. You can use the settings in rdrrXaaa.ini file to set where and how it is looked up. The difference from normal execdql is that it will look in the [server] section first to see if there are settings before it do the normal settings.