Description: When an ADT template is configured with a number w/ unit property for one or more of the columns, the configured default units are ignored if an update is performed through the API. If the users manually enter data through the user interface, the units are correctly applied.
Cause: The API uses the application's default unit when adding new rows to tables. It does not use the column's configured default units in the template and bypasses the internal value conversions.
Solution:
1. Only send the display value the application will perform the unit conversion.
Example API Request Format:
{
"key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"content": {
"display": "10 Torr"
}
}
2. If sending the value is needed, the user must specify the display unit and send the converted value in the system's internal unit.
Example API Request Format:
{
"key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"content": {
"display": "10 Torr",
"value": 0.0131579
}
}
Comments
0 comments
Article is closed for comments.