The InterAKT Dynamic Data tool is a replacement for the standard dynamic
data dialog. It is used in the MX Kollection 3, to provide a unified way
of building mark-ups, or place holders. These are recordset fields, server
or session variables, and other types of dynamic data that are replaced
at runtime by their corresponding values
A transaction is a group of SQL statements whose effects are logically
connected. Anything from simple queries to inserting, and deleting operations
can be considered a transaction, as well as more complex groups of several
statements which accomplish a specific task.
A trigger is a SQL procedure that performs an action when a transaction
(INSERT, UPDATE, DELETE) occurs. You can use triggers to perform validation
of input data, to automatically generate a value for a newly inserted
row, to read from other tables for cross-referencing purposes, or to support
alerts through e-mail messages.
A recordset is the result of executing an SQL query.
It is composed of multiple rows, each row having multiple columns. The
columns presented in the query result depend on the column list declared
in the query (they can belong to different tables). The number of rows
and their order depend on the query conditions (WHERE, GROUP BY, HAVING,
ORDER). The recordset acts as a source of dynamic data in web applications.
A query is a SQL command that will extract information from the tables
of a database. Essentially, a query is a request for information from
your database.
The server model is the Dreamweaver term for your combination of the
scripting language and/ or database
software used for development on your server, for instance PHP_MySQL,
ASP.NET, ASP VBScript, ColdFusion, etc. InterAKT extensions generate server
side code. Therefore, setting the correct server model in your site definition
is important so that extensions generate the proper code for your development
framework.
A database refers to data organized and stored on a computer that can
be searched and retrieved by a computer program. Most industrial-strength
and many smaller database applications can be addressed using SQL (Structured
Query Language).
Use 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 rsrecordsetrecordset.
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.
Using this simple InterAKT mark-up language,
you do not have to write the code for retrieving data yourself. It is
easier and faster to work with dynamic data this way. Also, when using
dynamic data in various MX Kollection 3
interfaces, the same type of mark-ups are added in the page code.