Parsware
All articles

Model-driven apps

View column properties

Each column of a view can have its own header, date format, alignment and control, without changing the field. Turn "Purchase Date" into "Bought", write dates out in full, line up the amounts, and show a yes-or-no column as switches.

The Assets list in dark mode with a Bought column of dates written in full, right-aligned costs and a column of switches, next to the title "View column properties"

A field's name and format are chosen for the whole table. A column in one view often wants something else: a shorter header, a date people can read at a glance, numbers lined up so they're easy to compare. You can set all of that on the column, and the field doesn't change.

We carry on with the Purchases view from Views: the lists people work in. Every picture is the real product.

Select a column

Open the view in the View Designer and select a chip on the View columns row. The Properties panel shows that column's settings:

  • Header: the column's title in this view. Empty uses the field's name.
  • Width (px): a fixed width. Auto lets the column size itself.
  • Date format: only for a date column.
  • Control: how the value is shown, from the controls that suit the field.
  • Alignment: Start, Center or End.

A header and an alignment

Select Purchase Cost, set Header to Cost and Alignment to End. Numbers that end at the same edge are easier to compare down a column.

Purchase Cost selected in the View Designer: Header set to Cost and Alignment set to End

Start and End follow the reading direction, so End is the right edge in English and the left edge in Persian or Arabic. You don't need a second view for right-to-left readers.

A date written in full

Select Purchase Date. Set its Header to Bought and its Date format to d MMMM yyyy. d is the day, MMMM the month's name and yyyy the year; MM would be the month's number, and HH, mm and ss the time. Anything else is shown as you type it.

Purchase Date selected: Header Bought, Date format d MMMM yyyy, Control Default (Date)

Leave the format empty and the column uses the field's own format, and failing that the app's (Settings → Calendar → Date formats).

A column of switches

Select In Service and set Control to Toggle, with Alignment Center. The column shows a switch in each row instead of Yes or No. It only shows the value: a list has no editing in place, so clicking the switch doesn't change the record.

In Service selected: Control set to Toggle and Alignment set to Center

The result

Save, and open the list in the app:

The Assets list on the Purchases view: a Bought column reading 22 April 2025, 5 November 2024 and so on, a right-aligned Cost column, and an In Service column of switches, two of them off

The two assets that are out of service stand out, which Yes and No in a column of text don't do.

A Persian date in one column

The control is also how one column can use the Persian calendar while the rest of the app uses the Gregorian one. Set Bought's Control to Persian Date and clear its format:

The same list with the Bought column in the Persian calendar: ۲ اردیبهشت ۱۴۰۴, ۱۵ آبان ۱۴۰۳, ۲۹ دی ۱۴۰۳ and so on

While writing this we found that a Persian date on an English page was shown with its year before its month. That's fixed, in lists, on forms and in the date picker.

The column settings, as the view stores them

The view keeps its columns as one list, and the settings of the columns you changed as another. After the steps above, Purchases reads:

{
  "logicalName": "con_asset_purchases",
  "displayName": "Purchases",
  "entity": "con_asset",
  "columns": ["con_name", "con_purchasedate", "con_purchasecost", "con_assignedto", "con_inservice"],
  "columnProperties": [
    { "field": "con_name", "width": 260 },
    { "field": "con_purchasedate", "label": "Bought", "format": "d MMMM yyyy" },
    { "field": "con_purchasecost", "label": "Cost", "align": "end" },
    { "field": "con_inservice", "controlType": "Toggle", "align": "center" }
  ]
}

Assigned To isn't in columnProperties at all, because nothing about it was changed: it uses the field's name, sizes itself and shows the field's default control. That is the rule everywhere in the platform: a setting that isn't written down follows the thing underneath it, so changing the field later still changes the column.

Notice too that the column settings never change which records the view returns or which fields it reads. They are only about how a value is shown, which is why they can be changed freely without affecting anybody's filters, totals or reports.

Which setting goes where

The same kind of choice can be made in three places, and the most general one is usually right.

Setting On the field On a form placement On a view column
Name people read Display name Label Header
Date format Default format Control's format Date format
Control Default control Control Control
Width Width
Alignment Alignment

Start on the field: set the display name, the default control and the date format there, once, and every form and view follows. Then change a form placement or a view column only where that screen's readers need something different. A Cost header in a narrow purchasing list is a good reason; repeating the field's own settings on every column is not, because each repetition is something to keep in step later. Required, read-only and default controls covers the field's settings.

Choosing widths

  • Let most columns size themselves. Auto fits the column to what's in it, and adjusts when the data does. Fixed widths are for the few columns where the content varies a lot.
  • Give the name a fixed width when names are long, as here. The first column is the one people read and click, so it shouldn't be squeezed by its neighbours.
  • Keep short codes narrow. A three-letter code in a 200-pixel column wastes the space a longer column needed.
  • Check on a laptop. A list designed on a wide monitor can scroll sideways on a 13-inch screen. Fewer columns is usually a better answer than narrower ones.

Formats worth knowing

The Date format uses the same letters as the field's default format and the reports:

Format Shows Good for
d MMMM yyyy 22 April 2025 Lists people read slowly
d MMM 22 Apr A narrow column where the year is obvious
dd/MM/yyyy 22/04/2025 Dense lists, in day-first order
yyyy-MM-dd 2025-04-22 Lists people sort and compare
d MMM HH:mm 22 Apr 14:30 Bookings and anything timed

For numbers, alignment is the setting that matters most. Right-aligned amounts in an English list, and left-aligned in a Persian one, which End gives you automatically, line the digits up so the larger figures stand out without reading them.

Showing a value, not editing it

A Toggle in a list shows a switch, but the switch doesn't change the record; a list has no editing in place. The same holds for every control in a view: it is a way of reading the value. To change a record, open it, or select several and use the commands on the command bar. Work with records in a view shows what people can do from a list.

Option sets and states in a column

You don't need to set anything for an option set or a State column to read well. They already show each value in its option's colour, with its icon, as they do on a form. That is often the single most useful thing a list can do: a column of Overdue in red among Paid in green is read without reading. Give the option set its colours, as Option sets shows, and every view that lists it benefits.

Questions that come up

If I rename the field, does the column header change? Only if the column has no header of its own. A column with Bought keeps saying Bought; one with an empty header follows the field's new name. That is the reason to leave the header empty unless this view needs different words.

Can a column show a value from a related table, such as the assignee's email? A view lists one table's fields. A lookup column shows the related record's name. For a list that combines fields from two tables, use a saved query, which can join them.

Can people change a column's width for themselves? They can choose which columns are shown with the Columns button, and sort however they like. The view's widths, headers and formats are the maker's, so the list looks the same for everybody who opens it.

Why can't I give a text column a date format? The format only makes sense for a value that is a date, so the panel only offers it for date columns. The same goes for controls: a column is offered the controls that suit its field.

Do column settings travel to Production? Yes. They are part of the view, which is part of the solution, so Bought and Cost arrive with the view, wherever it is imported.

Will a column setting break a report or a script? No. Reports and scripts read the field's value, not the way a view shows it, so a header or a format in a view changes nothing they see.

What's saved

A view keeps its columns as one list and their properties as another, holding only the columns you changed. A column you never touched stores nothing and looks exactly like the field. Both lists are part of the view, so they move with your solution. Take a column out of the view and its properties go with it.

Totals under a column aren't built yet. When they are, they'll get their own article.

Next: filters with And and Or.