Command Explanation
All pages rendered on the system use UDB commands to insert different elements on to the page.
For example, if you want to put the page title onto a template then you can insert the command {PAGE_TITLE}. This will be replaced with the current page title whatever page is being displayed.
If you want to add a link to a another page on the system then you can add {LINK(1013, Contact)}. This will create a link to the page number 1013 and add the text "Contact" (Contact).
All of the commands need to be enclosed in { } when used on the page and the command needs to be entered in upper case. They may also have parameters. These are enclosed in ( ). Most of the time it is easier to enter the parameters by position separated by commas. So in the LINK example above, the first parameter is the Object ID of the page you want to link to and the second parameter is the text you want to be displayed on the page. Sometimes there may be a larger number of parameter options and using lots of commas to get to the correct parameter can be awkward and confusing to read. In this case, you can use a JSON list of parameters. So for the example above, you can use {LINK(1013, {"text":"Contact","class":"btn btn-primary"})}. The JSON list of parameters can only be used as the last parameter. A list of all the parameters are detailed in the command help.
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.
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 shared 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.
If a parameter includes a comma it must be quoted {LINK(1013, "Contact John Doe or, a member of the team")}. If the parameter includes quotes and commas, quotes are escaped with another quote {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 preceeding the parameter value with two exclamation marks!!
See below for a full list of commands and their explanations.
Name | Description | Structure |
---|---|---|
AUDIT_ENTRY | Write a record away to the System Audit Trail | {AUDIT_ENTRY(title, obj_id, detail)} |
BASE_TAG | Add a "base" tag to the page header | {BASE_TAG(href, target)} |
EDITABLE | Create an editable WYSIWYG area on the page | {EDITABLE(name)} |
EXEC_AFT_NEW | Execute the "After New" code for an object | {EXEC_AFT_NEW(obj_id)} |
EXEC_AFT_UPD | Execute the "After Update" Code for an object | {EXEC_AFT_UPD(obj_id)} |
IMPORT_FORM | Display an import form for importing items to the Database using an Import definition Object | {IMPORT_FORM(list_id, header, class, style)} |
INPUT_AUDIO | Capture Audio from the users microphone and store it on the server. | {INPUT_AUDIO(obj_id, obj_part, xml_field)} |
INPUT_BUTTONS | Input Form Save and Cancel Buttons | {INPUT_BUTTONS(buttons, caption, seq, class)} |
INPUT_CANCEL_BUT | Input Form Cancel Button | {INPUT_CANCEL_BUT(caption, seq, class, style)} |
INPUT_DATA | Add an input field to an input form | {INPUT_DATA(link_id, obj_part, seq, ext_val)} |
INPUT_DEL | Delete Object Button | {INPUT_DEL(obj_id)} |
INPUT_DEL_LINK | Delete Relationship Button | {INPUT_DEL_LINK(parent_id, rel_type, child_id)} |
INPUT_EDIT | Edit Object Button | {INPUT_EDIT(obj_id, disp_type)} |
INPUT_FORM | Create an Input Form | {INPUT_FORM(obj_type, class, style)} |
INPUT_FORM_ID | Return the ID of the current Input Form | {INPUT_FORM_ID} |
INPUT_INCLUDE | Instruct the Input form to include relationships it would not normally include | {INPUT_INCLUDE(...)} |
INPUT_MODE | Return the Current Input Mode | {INPUT_MODE} |
INPUT_NEW | New Object Button or Inline form | {INPUT_NEW(par_id, obj_type, disp_type)} |
INPUT_PREFILL | Prefill input form elements | {INPUT_PREFILL()} |
INPUT_SAVE_BUT | Input Form Save Button | {INPUT_SAVE_BUT(caption, seq, class, style)} |
INPUT_SORT | Provide a button to allow the user to sort items in a list or via a relationship | {INPUT_SORT(obj_id, root_id, relat_id)} |
LOCK | Lock an object | {LOCK(obj_id)} |
LOCK_BUTTON | Add a button to the page to Lock the specified object | {LOCK_BUTTON(obj_id, ays_text, disp_text)} |
META_TAG | Add an HTML meta tag to the page header | {META_TAG(name, content)} |
OBJ_ADD | Create a New Object on the database | {OBJ_ADD(par_id, obj_type, char_data1, char_data2, text_data, friendly_name)} |
OBJ_COPY | Copy an object | {OBJ_COPY(obj_source, par_id)} |
OBJ_DEL | Delete an object | {OBJ_DEL(obj_id)} |
OBJ_UNDEL | Undelete an object | {OBJ_UNDEL(obj_id)} |
OBJ_UPDATE | Update an object on the database | {OBJ_UPDATE(obj_id, obj_part, value)} |
OBJ_UPDATE_COMMIT | Commit the object update changes | {OBJ_UPDATE_COMMIT} |
OBJ_UPDATE_TODO | Retrieve details of any updates to do. | {OBJ_UPDATE_TODO(response)} |
REL_ADD | Add a Relationship Link to the database | {REL_ADD(parent_id, rel_type, rel_level, child_id)} |
REL_DEL | Delete a relationship Link | {REL_DEL(parent_id, rel_type, child_id)} |
REL_MODIFY | Modify a relationship Level | {REL_MODIFY(parent_id, rel_type, rel_level, child_id)} |
REL_OBJ_ADD | Add an object and link it to an existing object | {REL_OBJ_ADD(link_id, rel_type, par_id, char_data1)} |
STEALTH_MODE | Turns date/time and user stamp off or on for object updates | {STEALTH_MODE(TRUE/FALSE)} |
UNLOCK | Unlock an object | {UNLOCK(obj_id)} |