InterAKT mark-up language
The InterAKT Dynamic Data provides automatically generated mark-ups for dynamic data, from the source you specify. These mark-ups are replaced at runtime by the actual value, and are taken into account when doing the operations they are involved in. It is used in MX Kollection 3 to provide a unified mark-up language for dynamic values on all server models. Using the InterAKT mark-up knowledge also reduces the need for developers to know a specific programming language.
There are several types of dynamic data that can be replaced by these mark-ups, starting with the data used in a transaction , to more specific variables (e.g. the current date). The mark-up is made up of the variable identifier, enclosed between braces (e.g. {dynamic}). Depending on the identifier format, the dynamic value to be replaced is taken from a different place, and the generated code differs. As you can see in the InterAKT Dynamic Data presentation, the dialog box can be accessed through the blue lightning icon, and it will generate the correct code, depending on the decisions you make in the drop-down menus.
You can also manually enter mark-ups, and they will be treated correctly at runtime, being replaced with their corresponding values. When entering the mark-ups by hand, you must pay attention at the identifier format, as it can only be one of the following list:
- {variable_name} – this is equivalent to the field value of the current transaction; if used as a trigger option, it will be replaced with the field value of the transaction the trigger is registered to. It can be used when trying to access a transaction field value before or right after a transaction executes. The code that gets generated in order to replace it with the correct value is:
· $this->getColumnValue(‘name_ctg’) – for the name_ctg field value of the current transaction, PHP model.
· $this->tNG->getColumnValue(‘name_ctg’) – for the name_ctg field value of the transaction to which the trigger is registered, also PHP model.
- {rsRecordset.myColumn} – it is equivalent to the value of the column myColumn of the rsrecordset recordset . Useful when trying to access a recordset column in an easy way. The equivalent code is:
· $categoriesRs->Fields(‘name_ctg’) – for the name_ctg column, PHP_ADODB server model.
· $row_categoriesRs[‘name_ctg’] – for the name_ctg column, PHP_MySQL server model.
- {GET.variable_name} – equivalent to the value of a GET passed variable. Use this mark-up to access variables that are passed to the page through the GET method, usually URL parameters. The equivalent code is:
· $_GET[‘id’] – for the id URL parameter, PHP model.
- {POST.variable_name} – equivalent to the value of a form variable passed through the POST method. Use this mark-up to work with submitted form variables. The equivalent code is:
· $_POST[‘id’] – for the id form variable, PHP model.
- {COOKIE.variable_name} – equivalent to the value of an HTTP cookie stored variable. It can be used when working with authentication variables stored in cookies. The equivalent code is:
· $_COOKIE[‘PHPSESSID’] – for the PHPSESSID variable, PHP model.
- {SESSION.variable_name} – equivalent to a session variable. A simple use is when trying to display the currently logged in user’s name on the page. The equivalent code is:
· $_SESSION[‘user_name’] – the user_name session variable, PHP model.
- {GLOBALS.variable_name} – this mark-up is valid for the PHP model only. It is equivalent to a global available variable, and it can be used to pass data across functions. The equivalent code is:
· $GLOBALS[‘user_name’] – the user_name global variable, PHP model.
- {REQUEST.variable_name} – this mark-up is valid for the ColdFusion server model only. It is the equivalent for a global variable, with the same use as it’s PHP correspondent above. The equivalent code is:
· #Request[‘user_name’]# – for the user_name variable, ColdFusion server model.
- {APPLICATION.variable_name} – only available for the ColdFusion server model, it is the mark-up to access an application variable. Usable when you need to invoke an application variable for your page. The equivalent code is:
· #Application[‘user_name’]# – for the user_name variable, ColdFusion server model.
- {NOW}, {NOW()}, {now}, or {now()}– this mark-up is replaced with the current date. Its value is represented in the screen date format specified in InterAKT Control Panel > Date formats. Use it when you need to assign the current date to a field in a transaction. For instance, when posting an online article, you might want the date to be automatically set to the current one, instead of having the user manually entering the date when the article was created.
Note: you can use both the lower case and upper case versions with the same result.
- {NOW_T}, {NOW_T()}, {now_t}, or {now_t()} – this mark-up is replaced with the current time. Its value is represented in the screen time format specified in InterAKT Control Panel > Date formats. Use this mark-up when you need to set the value of a transaction field to the current time.
Note: you can use both the lower case and upper case versions with the same result.
- {NOW_DT}, {NOW_DT()}, {now_dt}, or {now_dt()} – this mark-up is replaced with the current date and time. Its value is represented in the screen date and time formats specified in InterAKT Control Panel > Date formats.
Note: you can use both the lower case and upper case versions with the same result.
- {KT_defaultSender} – this mark-up is replaced with the value you set in the E-mail settings entry of the InterAKT Control Panel for the Default sender. The initial value is nobody@nobody.com.