The Parameters panel ships with the standard set of database parameters, but you can add extra optional parameters that aren't present by default:
Open Data Server Config > Parameters.
Choose Add New Optional Parameter.
Enter the parameter name, an initial value, and an optional description.
Click Save.
To remove one you added, select it and choose Delete Selected Optional Parameter. Note that you must save or reset any pending edits before adding or removing optional parameters.
Optional parameters are stored and served exactly like the built-in ones, so any custom key you add is included in the settings document that clients fetch from Pilot Data Server.
env- parameters as environment variables
Any parameter whose name starts with env- is automatically exposed to Pilot Edge and Template Builder as an environment variable, with the env- prefix removed. For example, the VCP parameter env-location becomes the environment variable location.
You then reference that variable differently depending on where you use it:
Context | Syntax | Example (for |
|---|---|---|
Template scripting (TypeScript) |
|
|
Field/panel visibility expressions |
|
|
Custom HTML (iframe) panel URLs |
|
|
Feed Browser URLs |
|
|
Inline HTML fragments |
|
|
Two things to keep in mind:
Which braces: URL-type fields (custom HTML panel URLs and Feed Browser URLs) use single braces —
{$location}. Scripting-expression and inline-HTML-fragment contexts use double braces —{{$location}}. Actual TypeScript scripts usevizrt.$env.location.A variable can appear anywhere within a string, for example
<https://myserver/{$location}/panel.html.>
In addition to your env- parameters, the applications always provide the built-in variables APP (the application name), PDS (the Pilot Data Server URL) and GH (the Graphic Hub URL).
This lets administrators define site-specific configuration values once in the database and consume them across many templates without any code changes.