Commands
All pages rendered on the system use Ultimate Database Commands to insert different objects onto the page. All of the Commands need to be typed in uppercase and enclosed in curly/squiggly brackets { }
.
As an example if you want to put the page title onto a page then you can insert the command {PAGE_TITLE}. This Command is then replaced with the page title of the page that is being displayed.
Another Command you can use is the {LINK} Command. This Command allows you to link, using an HREF anchor link, to another object on the system. For example, {LINK(#:7497, Link To This Page)}. This will create a link to this page, which is object number 7497, and add the text 'Link To This Page' to the link. Here is the outcome of this Command - (Link To This Page).
When adding an Object ID as a parameter, it is a good idea to precede it with "#:". This helps the system to identify the number as an Object ID. This is essential if you are writing an application to be used by other organisations as the Object IDs will need to be changed by the system when they import your application. So the example above, should be written {LINK(#:1013, Contact)}. See OBJ_ID for more info.
Parameters
Commands may also have parameters which are enclosed in round brackets ( )
. Most parameters can either be entered by their position or their name as a JSON string. We recommend that you enter the first few parameters (the common ones) by position, and then add any remaining parameters using a JSON string. Some parameters can only be entered as a JSON string.
Lets take the {LINK} Command to demonstrate the difference between these two ways and the parameters that are passed.
We are going to create an A HREF link to this page, object id 7497, display the text of "Link To This Page". Passing a parameter of 'example' with a value of 'position' (or 'name' in the second example). A bookmark link to an element with the ID of 'example_by_position' (or 'example_by_name in the second example). Finally adding the Bootstrap class of 'text-success' to turn the txt green.
Example
{LINK(#:7497, Link To This Page, example=test, example_by_position, {"class":"text-success"})}
Here's how this looks as a link - Link To This Page. If you do not want to use one of the parameters then you can leave the field blank but maintain the commas to indicate it position like this {LINK(#:7497, Link To This Page, , example_by_position,{"class":"text-success"})}. This can be confusing though! So we recommend using {LINK(#:7497, Link To This Page, {"bookmark":"example_by_position", "class":"text-success"})}
Parameters As An Array
You can also pass in an array of parameters using an array variable. To do this add a JSON parameter "param_array":"V_ARRAY". All the values in the V_ARRAY variable will be used as parameters.
If a parameter includes a comma it must be enclosed in quotes {LINK(1013, "Contact John Smith or, a member of the team")}. If the parameter includes quotes and commas, quotes are escaped with either another quote like this {LINK(1013, "Contact John ""The Man"" Smith or, a member of the team")} or can be escaped with a backslash like this {LINK(1013, "Contact John \"The Man\" Doe or, a member of the team")}.
Parameter values are individually interpreted before they are passed to the command for processing. This can be prevented by preceding the parameter value with two exclamation marks!!
Click this link for a full list of Commands and their explanations.