Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formula fields for system-defined units #17

Open
herrdivad opened this issue Apr 24, 2024 · 1 comment
Open

Formula fields for system-defined units #17

herrdivad opened this issue Apr 24, 2024 · 1 comment

Comments

@herrdivad
Copy link

Hi Team,

I have noticed a possibly incorrect behavior in the formula fields:
We need to use the formula field (or something simmilar) for calculations with input fields that are using system-defined.

The fact that input fields for formulas can have system-defined units, while the result field has none, can lead to errors in the formula if the user uses the green button to convert units (e.g. m -> mm).
Let's look at the simple example of the speed calculation v = s/t :
grafik
As long as the user does not change anything, the calculation works as intended 10 m / 2 s = 5 m/s
But if the users chlicks to change m to mm:
grafik
The result would be 1000 times greater. This would be fine, if the system was able to change the unit of the velocity to mm/s by itself, which is not yet possible, as formular-fields cannot have any system-defined units (or am I wrong?).
But without auto-units for results, the calculations is faulty.
Possible workarounds / fixes would be:

  • make it possible for admins to lock unit fields to a specific unit and therefor take the user the possibility to change e.g. m to mm.
  • don't stipulate a specific unit for the result, so that the users has to think for themself, if the result is m/s or mm/s. But that would not be a good idea and gets more complicated if hidden constants and conversion factors will be included in the formular.

Thanks in Advance.

Originally posted by @herrdivad in #14 (comment)

After discussion:

Nicole also asked herself, if the value given by the use is saved, and the translation to other units is only an other "representation", or if the value is actually overwritten each time a unit conversion is performed.
In case of "only representation", that could solve the formular issues, because the calculations always uses the "saved value" and not the "shown" value (which includes the conversion factor).

@herrdivad
Copy link
Author

After reading the Docu this issue could also be a discussion about a new function, but I'm not able to convert issues to discussion.
So @cllde8 you are please free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant