Favorite
The Favorite
ViewTemplate allows users to assign tags to specific datasets. These tags act as personal bookmarks or classification markers, causing the tagged datasets to appear in the special Favorite
context within the ADITO client. Tags added via this ViewTemplate can be viewed and managed through the "star" icon in the sidebar.
Functional Overview
When a user assigns a tag using this ViewTemplate, the associated dataset is included in the Favorite
Context. An exception applies to tags beginning with a hash symbol (#
), known as hashtags: Datasets tagged only by such entries do not appear in the Favorite
Context but remain searchable.
Example
The ViewTemplate "Favorites"
is used in the PersonPreview_view
.
Client Integration
In the user interface, the ViewTemplate displays:
- A toggle button in the form of a "star", which assigns or removes the default
"STANDARD"
tag. - A text box allowing the user to add custom tag titles. Suggestions based on existing tag titles appear in a dropdown as the user types.
Figure: Client appearance of the FavoriteViewTemplate
Figure: Example configuration of the FavoriteViewTemplate
Technical Behavior
Usage Scope
This ViewTemplate is intended for use only in PreviewViews.
Terminology Clarification
- Tag (broad sense): Refers to a "stamp shape" or category (e.g., "urgent"). These are internally represented as record groups and cannot exist without at least one assignment.
- Tag (narrow sense): Refers to a specific assignment of a tag to a dataset. This is a single instance of a tag usage.
Data Model Structure
Tagging functionality relies on two system tables:
1. ASYS_RECORDGROUP
This table stores the definitions of tags (record groups). Each row represents a unique tag title (e.g., "urgent").
Column | Description |
---|---|
ID | Technical identifier of the record group. |
USER_ID | Creator of the tag. |
TITLE | The title of the tag (e.g., "important", "#export"). |
GROUP_TYPE | Specifies the tag's function. Possible values: |
FAVORITE_GROUP
: Regular titled tag, shown in theFavorite
context under a named group.DEFAULT_FAVORITE_GROUP
: Automatically assigned via the star button; appears under group title"STANDARD"
.HASHTAG
: Tags beginning with#
. These do not appear in theFavorite
context but are usable for indexed searches.
2. ASYS_RECORD
This table stores individual tag assignments.
Column | Description |
---|---|
ID | Technical identifier of the tag assignment. |
OBJECT_TYPE | Label shown in the Favorite context (usually the name of the tagged dataset's context). |
ROW_ID | Unique identifier of the dataset being tagged. |
RECORDGROUP_ID | Reference to the ASYS_RECORDGROUP entry (i.e., tag type used for this assignment). |
This data structure allows the same tag title to be assigned across different contexts. For instance, both an Activity and a Knowledge record may be tagged as "urgent"
and will appear under a single group node in the Favorite
context.
Configuration
Entity-Level
To enable tagging, ensure the related entity has the useFavorites
property activated. This allows for "private" (user-specific) tagging functionality.
ViewTemplate Configuration
Typically, no manual configuration is required. By naming the ViewTemplate "Favorites"
and placing it in the desired PreviewView
location (recommended: directly below the top-level "Card"
ViewTemplate), standard behavior is enabled.
However, certain properties can be configured explicitly when required.
Available Properties
Property | Description |
---|---|
title | Can be left empty. This property is not linked to the drawer caption "Tags" shown in the UI, which is defined by the ADITO core and not customizable. |
objectType | Specifies the source of the "OBJECT TYPE" column in the Favorite context. Typically, this is the Context name. You can define a custom EntityField (e.g., PERSON_OBJECTTYPE ) with the following valueProcess : |
result.string("Person");
Alternatively, the default #CONTEXTNAME
can be used. This automatically inserts the current Context's name.
rowId
: Identifies the primary key of the tagged dataset (e.g., ACTIVITYID, CONTACTID). Default value #UID automatically resolves to the correct column based on DBRecordContainer configuration.
In advanced scenarios, tags may be assigned via Actions or automation rather than through the Favorite ViewTemplate. See the chapter Tags
for implementation details.