> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/design-considerations-and-frameworks/frameworks/assessment-framework/notes-advanced-implementation.md).

# Notes (Advanced Implementation)

## 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)](/release-9/design-considerations-and-frameworks/frameworks/assessment-framework/notes-standard-implementation.md).

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](/release-9/design-considerations-and-frameworks/frameworks/assessment-framework/externalizing-notes-data.md).

## Use

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

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-2bbae9bcf05313c7668d334b1781aad54a376f5d%2Ffbc27b79-83d1-4006-a58f-51a5737b89a9.png?alt=media)

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                  | <p>This field is required when you check the <em>Custom Sources</em> checkbox. It is the source data table for the notes.<br>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: <em>odbc:DSN=</em>.</p>                                     | 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                       | <p>This field is required when you select <em>Custom</em> in the <em>Use types</em> dropdown. It is where you define your own notes types. Fill in the following options:<br>- <strong>Type</strong>: 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.<br>- <strong>Caption</strong>: This is the caption value of that type.<br>- <strong>Parent</strong>: If you fill in a parent, the type becomes a subtype of the parent type.</p> | 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](/release-9/example-gallery/example-applications/notes-example-project-advanced-implementation.md). 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.

## Attachments

* [Notes - Oracle scripts.sql.zip](https://github.com/logicnets/community-portal/tree/release-9/docs/.gitbook/assets/k9lpt5-Notes---Oracle-scripts.sql.zip)
* [Notes - MSSQL scripts.sql.zip](https://github.com/logicnets/community-portal/tree/release-9/docs/.gitbook/assets/80lptr-Notes---MSSQL-scripts.sql.zip)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/design-considerations-and-frameworks/frameworks/assessment-framework/notes-advanced-implementation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
