Bases: Formula as column formatter

Please allow us to use formulas to replace the display value for a specific column/property.

Currently, formulas create new columns. My problem is, that the formula changes the value of the property in question from a number to a string. Now, if I sort the table by the new property, the sort order is wrong.

If I want to (easily) sort by the original value, I need to keep the raw/unformatted property in the table, which I don’t really want.

So, something like

properties:
myColumn:
displayValue: formattedColumn

where formattedColumn is the name of the formula

would be nice.

I don’t understand this,

First, you don’t need a formula to change the display value of property.

The formula type is determined by the output of the functions that compose it, if you use the right functions you can force the type.

I’m not taking about the display name for the column.

I want to replace the values in the column based on a function applied to each value.

Forcing a different type doesn’t work in this case. I’m replacing certain numerical values with a string based representation. Sorting based on the strings will give a different (wrong) sort order. Sorting should apply to the raw values while the display value should be based on the formula.

Attaching formatters to UI elements is not exactly unusual. I have been doing that decades ago. If you think a formula is not the right tool, I’m not opposed to a separate formatter entity.

if this is your problem, why don’t you keep the formula column as is and sort using the column corresponding to the base property?

Because then I have what is essentially the same value in the table twice.

It works, of course, but it is less than elegant.

ok, please open a new FR and make clear what you want, because I didn’t understand it at first.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.