0

Notes (Advanced Implementation)

  • updated 3 yrs ago

Description

This article outlines the use of the Notes part in a customized Notes implementation in the Assessment Framework. For the standard implementation of Notes within the Assessment Framework, see Notes (Standard Implementation).

The Notes function allows you to give your application users the ability to add, remove, or respond to notes in your application. Notes can be used for all kinds of purposes; for example, as an actions list, notes list, or review functionality. With Notes, you can also define categories such as Information, Action, and Question. When a user responds to a note, the system begins a discussion thread, which the system closes when the user closes the note. You can store notes in a local or remote database.

For information about storing your notes in a remote database, see Externalizing Notes Data.

Use

The advanced Notes implementation is available in and used with the Starter Application Framework in the special menu.

 

Add this component by selecting notes from the special dropdown menu, and the system adds a notes form node to your logicnet. You can also add the Notes component to a logicnet that is not part of the Starter Application framework by adding a form node to your logicnet and clicking the Elements tab of the form node editor. Click data tables and select Display notes from the dropdown menu. 

Editor Fields

Field Name Description/Use Type/Options Optional/Mandatory
Custom Sources This option allows you to define your own source database and source tables for the notes. Table Optional
Datasource This field is required when you check the Custom Sources checkbox. It is the source data table for the notes.

By default, the source is the notes.db stored on your server in the packages directory; however, it is possible for you to specify an alternative database, even an external one that is connected through an ODBC connection. For the latter you must configure an ODBC datasource and specify the DSN of the datasource in this field: odbc:DSN=<name of your DSN>.
Table Optional
Notes table This field is required when you check the Custom Sources checkbox. It is the name of the table in the source database in which to store the notes. Table Optional
Reply table This field is required when you check the Custom Sources checkbox. It is the name of the table in the source database in which to store the replies. Table Optional
Mapping table This field is required when you check the Custom Sources checkbox. It is the name of the table in the source database to store the additional logicnets meta data o.a. this is required for the review functionality on logicnets. Table Optional
Meta table This field is required when you check the Custom Sources checkbox. It is the source table for storing additional meta data. See Meta mapping below for more information about which data, Table Optional
Meta mapping This field is required when you check the Custom Sources checkbox and when the Meta table field is not empty. It allows you to define objects with values that you want to store by the note and can be data that is not stored by default, such as specific workflow or user data. To add such data to your notes, you can define the name of the object in the Name column and you can define the value or value object in the Value column. Collection Optional
Selection This option allows you to specify a filter for which notes to show. Select from the fields in the notes table to compose the filter query. The system supports interpolation for dynamic evaluation of values. Query Optional
Use types This option allows you to define if you want to use types. Choosing Custom to define your own types, and choose Yes to have the system use the default types: Information, Question, and Action. Dropdown Mandatory
Types table This field is required when you select Custom in the Use types dropdown. Enter the name of the source table that will be created to store all your custom node types. Table Optional
Types This field is required when you select Custom in the Use types dropdown. It is where you define your own notes types. Fill in the following options:
  • Type: This is the name of the type and must be a value without spaces. You can use this value in the custom style sheets to style the note type.
  • Caption: This is the caption value of that type.
  • Parent: If you fill in a parent, the type becomes a subtype of the parent type.
Checkbox Optional
Include title When you select this option you can add titles to your notes. Checkbox Optional
Include rich textbox When you select this option you can use a rich textbox for typing your note. Checkbox Optional
Update note with reply date When you select this option the system will update the timestamp of the note when the user replies. Checkbox Optional
Last note on top When you select this option the system orders the notes so the most recent is on top. Checkbox Optional
Drop closed to bottom When you select this option the system moves closed notes to the bottom of the list. Checkbox Optional
Onload callback (js) This is the JavaScript function the system executes while it loads the notes. JavaScript function Optional

Custom Types Styling

When you chose the Custom option as Use types, you are able to define your own note types. The type column is the column where you define the name of the type, and you can use this name in your custom style sheet to style your note type. The system adds the type name you define as an class in the note. Example:

.test_type {
border-right: 10px solid yellow !important;
}

In this example, the type test_type gets styled with an right yellow border. The !important is needed to override default styling.

Datamodel

Notes uses the three tables described below: Notes, Notes Mapping, and Replies. When you want to define your own tables you have to make sure that you create tables that contain the same fields as those listed below.

Notes

This table contains the basic data that makes up a note. In this table you can find the following data:

  • ID: This is the id of the note record.
  • Stamp: This is the timestamp when the note is created.
  • User (user_id in v7.3+): This is the user who created the note.
  • User_email: This is the email address of the user who created the note.
  • Title: This is the title of the note, if the "Include title" parameter is checked.
  • Text: This is the note text.
  • Status: This is the status of the note: open or closed.
  • Replies (nr_of_replies in v7.3+): This is the number of replies made on the note. To create this table you can use the script below, and the name of the table should be the same as the name you defined in the Notes table parameter.
  • Sessionid: This is the session id of the session in which the note is created.
  • Package (pkg_name in v7.3+): This is the name of the package in which the note is created.
  • Version (pkg_version in v7.3+): This is the version of the package in which the note is created.
  • Pkg_category (v7.3+): This is the category of the package in which the note is created.
  • Additionalinfo: Reserved
  • Screenshot: Reserved
  • Context: Reserved
  • Data_log_idx: Reserved
  • Focus: Reserved
  • Session: Reserved

Notes Mapping

This table contains the default meta data that gets stored by the note. The following data is stored in this table:

  • ID: This is the id of the mapping record.
  • Note_id: This is the id of the note to which the mapping data is linked. You can use this column to join the table with the Notes table.
  • Logicnet: This is the logicnet id of the logicnet to which the note is linked if the note is linked to a question.
  • Node: This is the node id of the node to which the note is linked if the note is linked to a question.
  • Partid (v7.3+): This is the unique id of the question to which the note is linked.
  • Pkg_data (v7.3+): This is the meta data of the package in which the note is created.
  • View (view_type in v7.3+): This is the view id of the node to which the note is linked if the note is linked to a question.
  • Type: This is the note type.
  • Reference: Reserved
  • Tab_data: This is the reference to the selected question within a tab control.
  • Tab_id: This is the id of the tab in which the note is created.
  • Tab: Reserved
  • Source_id: Reserved

Replies

This table contains all replies to notes. You will find the following data in this table:

  • ID: This is the id of the reply record.
  • Note_id: This is the id of the note to which the mapping data is linked. You can use this column to join the table with the Notes table.
  • Stamp: This is the timestamp when the reply is created.
  • User (user_id in v7.3+): This is the user who created the reply.
  • User_email: This is the email address of the user who created the reply.
  • Text: This is the reply text.

The Notes and Replies tables use the id of the logged-in user. If you want to record the id of the logged-in user with notes, you have to ensure that authentication is switched on for your project. You can switch on authentication in the security section of your project settings.

Example

Download and import into your Designer the example project. The example scripts attached to this topic provide data table creation help in creating the required notes tables in the Oracle or MS SQL server database.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 3 yrs agoLast active
  • 33Views
  • 2 Following

Home