Version History
Item version history directly inside the form.
Widget description: versionHistory
This widget displays the item’s version timeline (who changed which columns, when, and from which value to which) and item comments directly inside the form. Users do not need to open SharePoint’s built-in version history. You can restrict which columns are tracked in the history and allow adding comments. It is a virtual widget and is not saved to the item; it reads data from SharePoint.
Adding to the form
On the Widgets tab, select Version History & Comments (subtitle “Widget · item change timeline”) and drag it into a section, or click “+”. A new widget spans the full width, shows both versions and comments, and loads 15 versions.
Version history only exists in lists where item versioning is enabled (List Settings → Versioning settings). Without versioning, only the current state is shown.
Inspector settings
The same options are also available in the large configuration dialog (click Open detailed settings in dialog or the Configure icon on the widget card). The dialog has Display and Tracked columns tabs, a live preview against the real list (on demand via Show preview, or Refresh preview after edits), and applies changes only when you click Save (single Undo step).
| Option | Property | Description | Default |
|---|---|---|---|
| Show version timeline (who, when, changes) | showVersions | Enables the Versions tab. | yes |
| Show item comments | showComments | Enables the Comments tab. | yes |
| Allow adding new comments | allowAddComment | Shows the input for adding a new comment. Available when comments are enabled. | yes |
| Maximum number of loaded versions | maxItems | How many latest versions to load (1 to 100). | 15 |
| Tracked attributes in history | trackedFields | Toggle between All columns / Selected attributes. When selecting attributes, check the fields whose changes should be displayed. See Tracked columns. | all columns |
| Hide versions without changes to tracked fields | hideUnchangedVersions | When specific attributes are selected, hides versions where none of them changed. | yes (when attributes selected) |
| Custom label, Column span, Visible | customLabel, colSpan, defaultVisible | Common widget options. | “Approval and Change History”, 12, yes |
If you disable one of the tabs, only the other is shown and the tab switcher disappears. If you disable both, the widget stays empty.
Tracked columns
Without restrictions, the history shows changes to all columns, including technical ones. The Selected attributes option narrows this down to the fields you care about (such as Status and Approver):
- The list includes SharePoint list columns and form fields (excluding widgets). You can search, click Select all, or Clear selection. The count of selected items is shown.
- For each version, only changes to the selected fields are displayed. Versions where none of them changed are hidden if Hide versions without changes to tracked fields is enabled.
- When attributes are selected, their count is shown in the widget header. If no versions remain, the widget displays “No recorded changes in tracked fields (…)”.
- Lookup or person fields, which SharePoint stores under a name with an
Idsuffix, are also matched by the name without the suffix.
Runtime behavior
- Date and time of versions and comments are formatted according to the form language (for example, 10. 11. 2026 14:05 in Czech, 11/10/2026, 2:05 PM in English).
- New: the item has no history yet; the widget displays “Version history and comments will be available after saving the item”.
- Edit and View: the widget loads item versions (up to
maxItems, newest first) and comments. Each version shows its number (e.g., v2.0), author, timestamp, and changed columns in the format name:old value→ new value. The first version shows the initial filled values. - Column name in the history uses the field label from the form. If the field has no custom label on the form, the SharePoint list column title is used, and only if that cannot be read does it fall back to the internal name (e.g.,
Status_x0020_Code). - Boolean values (Yes/No) are displayed in the form language (cs Ano/Ne, en Yes/No, de Ja/Nein, sk Áno/Nie).
- Comments: on the Comments tab there is an “Add comment” input (submitted with Enter or the button) and below it the comments newest first with author and timestamp. Comments are saved to SharePoint immediately without waiting for the form to be saved. It uses standard SharePoint list item comments.
- Comments in View mode: comments can be added even in View mode without switching to Edit. This is intentional and matches native SharePoint: comments are stored in item comments rather than item columns, so the item itself is not modified and no new version is created. To prevent users from adding comments, disable Allow adding new comments (
allowAddComment); comments will then be read-only. - The widget never marks the form as dirty. Load errors are displayed as an empty list.
- In the designer preview, the widget may show sample data so the layout is visible.
Text translations
The widget title (customLabel) can be translated. Built-in UI strings (tabs, hints, button) switch automatically according to the form language. See Translations and multilingual forms.
Rules and scripts
- setVisible: shows or hides the widget, for example showing history only to approvers (condition on user group).
- The
setReadOnlyaction has no effect on this widget and is not offered for it in the inspector. To disable adding comments, turn off Allow adding new comments.
Configuration example (JSON)
{
"internalName": "widget_history",
"customLabel": "Approval history",
"fieldType": "versionHistory",
"colSpan": 12,
"defaultVisible": true,
"versionHistoryConfig": {
"showVersions": true,
"showComments": true,
"allowAddComment": true,
"maxItems": 20,
"trackedFields": ["Status", "Approver", "TotalBudget"],
"hideUnchangedVersions": true
}
}
Limitations and tips
- Anyone with access to the item can view its history. Tracked column values are readable by all viewers, so do not store sensitive data in them if every reader should not see it.
- Versions are read from SharePoint, so you will only see those retained by SharePoint. The version count limit in list settings therefore limits how far back you can see.
- Tracked field filtering is applied only to the loaded
maxItemsversions (at most 100). For long-lived items with a small set of tracked fields, increasemaxItems, otherwise few versions may remain. - Comments cannot be edited or deleted in this widget.
- Who is allowed to add comments is governed by SharePoint item comment permissions, not the form mode. See Comments in View mode.