d = paradata(action_type『, argument1, ..., argumentN』);
function performs an action related to the paradata log
. The first argument, action_type
, must be one of the following:
|concat||Concatenates several paradata logs into a single log. The first argument is the file name of the output log. The subsequent arguments are the file names (as string expressions or string lists) of input logs. You can concatenate into the currently open paradata log, but in that case you must also include the currently open paradata log as an input.|
|query||Executes a query on the paradata log. This is the same as: sqlquery(filename(paradata),...).|
|open||Opens a paradata log to start logging events. Specify the file name as a string expression as the sole argument.|
|close||Closes the currently open paradata log.|
|flush||Writes all cached paradata events to the log. This is rarely needed, and may only be necessary if you want to query the paradata log from an external application.|
It is not recommended that you open or close paradata logs via logic, as the log will not contain all of the initializing features that exist when specifying the paradata log when the application begins (and via the PFF file).
For the open
, and flush
actions, the function returns a logical value of 1 (true) if successful and 0 (false) otherwise. For the concat
action, the function returns the number of paradata logs concatenated, or default
upon error. Look at the documentation for the sqlquery
function to see the return values for the query
string message_events_query = maketext(
"SELECT COUNT(*) "
"FROM message_event "
"JOIN event ON message_event.id = event.id "
"JOIN case_instance ON event.case_instance = case_instance.id "
"JOIN case_info ON case_instance.case_info = case_info.id "
"WHERE case_info.uuid = '%s';",
numeric message_events_for_this_case = paradata(query, message_events_query);