Create a server variable

Last modified by Aurelie Bertrand on 2025/11/14 11:59

It can sometimes be useful to create a server variable, particularly if you want to have a reference to your parent or root server directory (for example, to automate server creation).

These variables can then be used in this format: ${server.ServerVariableName}.

To create a server variable :

  1. Stop the server.
  2. Edit the serversettings.xml file located in the AppData/Enterprise Server/ddenterpriseapi/config directory.
  3. Locate the line <group category="$uisrv.Advanced" id="serverParams" name="$uisrv.ServerParams"></group>

  4. Replace it with the following :
<group id="serverParams" name="$uisrv.ServerParams" category="$uisrv.Advanced" catMenuName="$uisrv.Servers" menu="0" submenu="5">
<input disabled="false" mandatory="false" name="ServerVariableName" reg="false" sample="" showif="" src="" text="ServerVariableName" type="textfield" userparam="false" value="value of my variable"/>
</group>

in which:

  • ServerVariableName is replaced by the desired name.
  • Set the value attribute to the desired value.
  1. Save the file.
  2. Restart the server.
    ➡ The server variable is now created.
    It is visible, and its value can be modified, in the new Server Variables tab added to Server Parameters.1763114374040-795.png

You can then use it, for example, in a document server in the URL field.

1763114550897-576.png

Server variables can also be used to create a database connection that is valid in several environments.