Column Formatting in List Views

Colored labels, progress bars, due date alerts and people with photos in the SharePoint list view, set in the designer without writing JSON. Pro

Overview

In the designer's List view tab (section Column formatting in list views) you set a visual format for columns in the standard list views. FormCraft compiles the format into native SharePoint column formatting (JSON in the column property CustomFormatter). The result therefore works in every view, in the SharePoint and Microsoft Lists mobile apps and with Microsoft Lists sync, even without FormCraft loaded. A short summary is in the listColumnFormatting reference. The feature requires a Pro license; without it the section shows a sample result and a Get Pro button.

The column formatting section: the column list with statuses, the column detail and the list preview and JSON on the right

The section has three panes side by side:

Supported column types

Columns of the following types can be formatted; other column types (for example hyperlink, multiple lines of text, managed metadata) are not offered in the column list.

SharePoint column typeAvailable formats
Choice, Multiple choice (Multichoice)Label
Single line of text (Text)Label (you enter the values by hand)
Lookup, including multiple valuesLabel (enter the values by hand or load them from the lookup list)
Number, CurrencyProgress, Colour by ranges
Yes/No (Boolean)Yes/No icon
Date and time (DateTime)Due date alert, Date status
Person (single or multiple, User / UserMulti)Person (a row of avatars for several people)
System columns: Created, Modified (date), Created By, Modified By (person)By type; listed after the regular columns

Format types

Each column has exactly one format. The settings of the chosen format are in the column detail.

No format text

The column is shown as plain text. No format is the default for a column that has no FormCraft format yet. When you choose No format for a column with an existing format (or click Reset to default), saving the form removes the formatting from the column (an empty CustomFormatter is written). This returns the column to its original look without touching SharePoint by hand. A column whose format was created outside FormCraft and which you do not touch in the builder stays unchanged on save (the builder shows Keeps the existing SharePoint formatting); it is removed only after you click Reset to default.

Label badge

Shows the column value as a colored label depending on what the column contains. Intended for Choice, Multiple choice, Text and Lookup columns. The settings are a Value | Colour | Icon table: for each value choose one of 7 colours (green, red, yellow, blue, purple, grey, orange) and an icon (none, check mark, cross, clock, flag, warning). For Choice and Multiple choice columns the values come from the column's choices (a multiple choice column renders one label per value); for text columns you enter the values with + Add value. For a Lookup column the label shows the display text of the selected item; enter the values by hand, or click Load values from the lookup list to take up to 50 names (the Title field) from the lookup list. A multi-value lookup renders one label per item. Values without settings are shown without a format.

Label style (badgeStyle): the Style switch above the table offers soft (tinted, default), solid (full colour with white text), outline (coloured text with a border in the text colour) and dot (a coloured status dot before the text). In the list view the styles are converted into SharePoint colour classes, so the shade can differ slightly from the designer preview. The same styles are available for the columns of the Related items and Related documents widgets.

{ "type": "badge", "badgeStyle": "dot", "defaultColor": "subtle",
  "badgeOptions": { "Approved": { "color": "success", "icon": "Checkmark" }, "Rejected": { "color": "danger" } } }

Progress progressBar

Shows a numeric value as a horizontal bar. Intended for Number and Currency columns. Enter the maximum as a fixed number (max, default 100) or choose another column of the row the maximum is read from (maxField; it takes precedence over the fixed number), for example a Budget column for a spending bar. SharePoint stores percentages as 0–1, so for percentage columns set the maximum to 1. You can also set a unit (unit, quick choices %, Kč, h), the bar colour (color) and a switch to show the numeric value (showValue).

{ "type": "progressBar", "maxField": "Budget", "unit": "Kč", "color": "brand", "showValue": true }

Colour by ranges numberRange

Colours a number or an amount by thresholds, for example a price below 10,000 green, from 10,000 yellow and from 100,000 red. It also suits numbers such as "days to due date" or an error count. Intended for Number and Currency columns. The From (inclusive) | Colour | Icon table contains a Lower values row (applies below the lowest bound; the bin button turns it off so numbers below the bound stay uncoloured) and any number of ranges with a from bound. A value gets the colour of the range with the highest bound that is less than or equal to the value; zero is a valid value, an empty cell stays empty. The Show as switch chooses a badge (default) or coloured text (colorMode: "text"), the Unit field appends text after the number. Only named palette colours are available (no custom HEX colours).

{ "type": "numberRange", "unit": " EUR",
  "ranges": [ { "color": "success" }, { "from": 10000, "color": "warning" }, { "from": 100000, "color": "danger", "icon": "Warning" } ] }

Yes/No icon yesNo

Shows a Yes/No column as a green check mark and a red cross instead of text. The Show as switch offers icon (icon only, the Yes/No text is in the tooltip), iconText (icon and text) and badge (a coloured badge with text). The colours of Yes and No can be changed (trueColor, green by default; falseColor, red by default). SharePoint column formatting is not translated, so the Yes and No texts are inserted in the default form language; users with another language see the same text. An empty value is shown as No.

{ "type": "yesNo", "yesNoDisplay": "iconText", "falseColor": "subtle" }

Due date alert dateAlert

Highlights a date according to how close the deadline is. Intended for Date and time columns.

{ "type": "dateAlert", "pastDueColor": "danger", "dueSoonColor": "warning", "daysAheadWarning": 3,
  "statusField": "Status", "neutralIfStatusIn": ["Done", "Cancelled"] }

Date status dateStatus

Shows a date as a badge or coloured text by its status relative to today: Overdue, Today, Next N days (the "soon" window, soonDays, 7 by default) and Later. Intended for Date and time columns; the existing Due date alert stays unchanged. The Text option (dateText) sets the cell content: relative (default, relative text "tomorrow", "in 3 days", "5 days ago"), status (the status name), date (the date) or dateRelative (the date with the relative text in brackets). Each status has its own colour (dateStatusColors), and the Show as switch chooses a badge or coloured text. The status is calculated by calendar days when the list view is displayed; texts are in the default form language.

{ "type": "dateStatus", "dateText": "relative", "soonDays": 7,
  "dateStatusColors": { "overdue": "danger", "today": "warning", "soon": "informative", "later": "subtle" } }

Intended only for Hyperlink (URL) columns in the Related items and Related documents tables; it is not used in the list view output. Without a rule the value is shown as a clickable link with its description. A link rule with linkDisplay changes the display: address shows the URL itself as the link text, plain shows the description as plain text without a link. The option is set with the Display as cards in the widget Columns tab.

{ "type": "link", "linkDisplay": "address" }

Person persona

Shows a person with a photo and a name. Intended for Person (single person) columns including the system columns Created By and Modified By. Switches: Show photo (showPhoto, on by default), Show name (showName, on by default) and E-mail link (showEmailAction): clicking the name opens a new message.

Several people: a column that allows several people shows a row of avatars (the name is in the tooltip). Maximum avatars (maxAvatars, 5 by default) limits the count; further people are summarised in a "+N" badge. When you turn the photo off, the names are shown as grey labels instead of avatars. Name and e-mail link are not offered for the row.

{ "type": "persona", "showPhoto": true, "showName": true, "showEmailAction": true }

Written to SharePoint when you save the form

Since version 1.47.0 formats are not written one by one but all together on Save form. Until then, edits in the section are only a draft; a column has no separate "Apply" button.

  1. Change the format of one or more columns. Each changed column gets a blue dot. Pending writes count as unsaved changes (the Unsaved changes status, a prompt when closing the designer).
  2. Click Save form. The form configuration is saved first and only after it has been saved successfully are the formats written to the columns one by one. If saving the configuration fails, nothing is written to the columns.
  3. The message after saving reports how many formats were written (Form saved · column formats written to SharePoint: 3). If a column could not be written (for example a missing permission) or was skipped, the message lists it with the reason; the column keeps waiting to be written and is tried again on the next save.

The section footer shows the status of the selected column (✓ The column matches the settings, ● Will be written to column … when you save the form, Custom formatting will be overwritten on save (after confirmation), Changes made outside FormCraft will be overwritten on save (after confirmation), Missing permission to manage the list) and the summary Column formats written to SharePoint on save: N. Footer buttons:

The section footer with the column status, the pending writes summary and the Reset to default, Restore original and Discard changes buttons

Overwrite protection

Before saving, the SharePoint formatting of every changed column is read again. If a column has formatting that FormCraft did not create, or that was changed outside FormCraft since the last write, one dialog Overwrite the column formatting? lists those columns:

A format changed only outside FormCraft is not overwritten unless you change it in FormCraft.

The Overwrite the column formatting? dialog listing the columns with custom or changed formatting

Permissions

Writing a format to a column requires the Manage Lists permission on the list. Without it the section is read-only: the detail shows an explanation, the format choices are disabled and nothing is written; the footer shows Missing permission to manage the list. For permission details see Administration: Permissions.

Limitations and the mobile app

The same formats (label, progress, due date, colour by ranges, Yes/No, date status) can also be set for the columns of the Related items and Related documents widgets in the form; those are rendered by FormCraft itself and are not written to SharePoint.