Hi there,
I have build a simple calculator which calculates some plastic specifications called MFI (each has got min and max, compare the screenshot). There are 3 different types of MFI (Melt flow index) MFI 2, MFI 5 and MFI 21 / HLMI. I have got all the functions to calculate each of these types, if you have got one of them given.
The aim: If you type in a
value in one of the fields, all the other fields should be calculated automatically. So far so good.
The problem: If you change one of the values, the system do not recalculate the other values. I just build a "reset" button to solve the problem.
Does anybody has a nicer approach?
All the calculation are in the specific on user input area of each field. I.E.: MFI 2 min:
- if (input.calc = "Berechnen")
- {
- if (input.MFI_5_min = null) // this prevent the infinite loop
- {
- input.MFI_5_min = (input.MFI_min * 4.5);
- }
- if (input.HLMI_bis = null)
- {
- input.HLMI_bis = (input.MFI_min * 100);
- }
- }
The calc field with " berechnen " is for the reset button:
- if (input.Reset1 = "Reset")
- {
- calc.deselect("Berechnen");
- input.MFI_min = null;
- input.MFI_max = null;
- input.MFI_5_min = null;
- input.MFI_5_max = null;
- input.HLMI_bis = null;
- input.HLMI_max = null;
- }
- if ((input.HLMI_bis = null) || (input.HLMI_max = null)) // this is just to check if the reset is done
- {
- input.calc = "Berechnen";
- Reset1.deselect("Reset");
- }
My approach: I have to indicate if you type in a new value in one of the fields, and then the others should be 1. reseted and 2. recalculated.
Has anybody an approach how to implement this into zoho?
THANKS!