Units for numer fields


#1

Units for numer fields

Plain number fields can be highly ambiguous at times. E.g. does “width” mean widht in mm, or in inch? When working in teams on the data, users entering data in the US might be more comfortable entering inch and users in europe would prefer cm.

This could be fixed by creating field types for length, area, volume etc. But this would lead to a whole host of field-types and would make it harder to extend further when incorperating more exotic cases like electrical current, temperature or units of time.

I would suggest to extend the number field time with an optional parameter to set it’s unit.

User Input Conversion

The Default unit is the used for by the API to return entered value. When entering a Value in a different Unit it should automatically converted. The JSON output should still be a simple number. The API-Documentation should be extended to show information about the returned unit.

Mixed unit inputs like 6"2’ should automatically be turned into a decimal value.

A user could change the unit to show in the column, without changing the base unit of the API.

Conversion in API

The API could be extended with a request parameter, to retrieve number values in a prefered unit.

Formulas

Formulas could be added, to work with units. E.G. Converting a given Unit into another (width-mm to width-inch). Or do calculate the Surface area by two given lengths.

Use Cases

  • A merchand dealing in different Countries. Measures entered into one Column in a metric Unit automatically update the column for Imperial units.
  • A property manager could enter the dimension of rooms in an apartment, automatically calculating the area of.
  • Developers get a unambiguous about the meaning within a number field.
  • Entering Temperature Data that is given in kelvin (K), celsius (degC), fahrenheit (degF)

Examples of Unit-Categories:


#2

Wow! Thank you so much for the in-depth proposal here! Feedback like this is really useful for us when we’re deciding which features to prioritize, especially when it’s in this level of detail. :smile: I’ll be sure to pass this request along to the rest of the team.


#3

Excellent suggestion and one that I’m very much hoping will be added soon! I would like to add to the suggestion the ability to enter custom units as well.


#4

Also the ability in the number/unit field to NOT have decimal places. I use it for stock control and just have whole units.


#5

You can configure the number field to just use integers in the field configuration menu—would this help?


#6

Thanks, that’s exactly what I was after - now I feel stupid … it was
there all the time :wink:


#7

This is a great feature request that would add infinite depth to all of my tables! Units would be great when saving and working with recipes, grocery lists, food conversions, weight loss tracking, exercise tracking, and various other health-related information.


#8

Yep, this would be awesome! I’d use the heck out of this kind of functionality.

Personally, I would utilize this for DIY projects at home (gardening, wiring, carpentry, renovation) but I also see it as a really cool way to do sample collection for science projects, Math / Physics homework and a ton of other youth STEM stuff; I would definitely start recommending this to my students.

If I were to add anything specific to this request, I might suggest that IPS distance units be capable of handling fractional math. Until we hard-headed Americans have unshackled ourselves from the 5/16" socket mentality, remembering that 5/16" is equivalent to 0.3125 can be a bit of a chore and a common source of measuring error.


#9

I’d also like this feature, even if it is just an extension of the currency field, with the option to add the symbol behind the number instead of before.