Forum Discussion

csludtke's avatar
csludtke
Ideator I
2 months ago

Best Way to Present a Complex Property with a Value (float) and Unit

I am interested in Tracking a Dimensional Property 

For example, Engagement Stock Length of a Rod

I want to persist the value of the Length using SI (Meters) in the Database.

I want to allow the user interface to allow the user to select the Unit from a pre-defined units (inches, millimeters, feet, etc.)

When the user changes the value of the unit, I want the system to convert the value shown to that unit.

If the Unit shown is not Meters, I want the system to convert and save the value shown to Meters.

Has anyone done this?  Does Aras have any advanced data types for this?

3 Replies

  • No: Aras is not that advanced.

    BUT: It´s not hard to do. It´s one of the typical questions that you can perfectly solve with AI:

    https://chatgpt.com/share/689304e3-6dd0-8003-82c1-8715ccc40a37

    - Instead of the html part, use the existing Innovator "Unit" list.
    - Add an "onChange" Method to the "Unit" list.
    - The code uses an event listener. We don´t need this one, so simple remove the event listener stuff from the JS code. 
    - Instead of document.getElemetnById to get the native HTML elements, rewrite to use the OOTB Aras "value" and "unit" fields.

    BTW: For those who think to directly ask AI for a an Innovator solution instead of a generic HTML solution. Go for it! The answers are just very often very wrong. Most of the time you get outdated solutions for Innovator 11. :)