04-16-2021, 09:24 PM
How to create a column accepting number values only?
There are columns that work this way without any adjustments.
For example:
On the sthpw/task page, there are the columns "actual_duration" and "actual_quantity".
If I create a new column, I can very easy do some calculation like this: @GET(.actual_duration) / 8 + @GET(.actual_quantity)
If I create my own columns for numbers, I can't get it to work. Even if I take the Formatted Widget, it's not working.
If I do some calculations with such a column, it is used as text.
So doing something like:
@GET(.newColumn1) + @GET(.newColumn2) - it will "just" combine two strings. This is ok, if I need this.
But I want it to be number values, so I can do something like this:
@GET(.newColumn1) + @GET(.actual_duration) - this is not working, as the first column gives a string and the second a number value.
How can I format a column to just accept number values and to use the number values for calculations?
There are columns that work this way without any adjustments.
For example:
On the sthpw/task page, there are the columns "actual_duration" and "actual_quantity".
If I create a new column, I can very easy do some calculation like this: @GET(.actual_duration) / 8 + @GET(.actual_quantity)
If I create my own columns for numbers, I can't get it to work. Even if I take the Formatted Widget, it's not working.
If I do some calculations with such a column, it is used as text.
So doing something like:
@GET(.newColumn1) + @GET(.newColumn2) - it will "just" combine two strings. This is ok, if I need this.
But I want it to be number values, so I can do something like this:
@GET(.newColumn1) + @GET(.actual_duration) - this is not working, as the first column gives a string and the second a number value.
How can I format a column to just accept number values and to use the number values for calculations?