Making Calculations Automatically
I want to create an event where a measurement is entered into a input field and the measurement is then automatically subtracted from another existing field and populates a third field. Sounds pretty basic, but can't figure it out. Thanks.
Check out this tutorial to learn how to create calculations in Justinmind.
Check out this tutorial to learn how to create calculations in Justinmind.
Hello David,
In this case, you will need to have a trigger to determine when the editing of the second field has finished. For example, you may do so by specifying an on key up event type to occur after any given key is pressed. Then, you may add an action of set value for the third text box and select calculated to open the expression builder. Once there, you'll need to drag the first text box, a minus function, and then finish with the second text box.
Sincerely,
Luisa
Hello David,
In this case, you will need to have a trigger to determine when the editing of the second field has finished. For example, you may do so by specifying an on key up event type to occur after any given key is pressed. Then, you may add an action of set value for the third text box and select calculated to open the expression builder. Once there, you'll need to drag the first text box, a minus function, and then finish with the second text box.
Sincerely,
Luisa
Luisa, been there and done that. The problem (I think) is that the first field you see with existing numbers are variables that have been transferred to this screen from a previous screen.
I have tried everything without luck including:
1. Creating a new event and following your instruction above -- field two is triggered by a tab after the data is input to make the calculation and display in field three. Result: a calculation is made with the wrong answer (ex. 2 -1 = 120)
2. Tried to add the above tab trigger calculation as an "add action" to the "Do" part of the variable event. Result: did not work.
3. Added an "interaction" from the"On page load" that populates the variable data display No luck.
If I remove the variable data event in the first field and manually populate the field with numbers it works, so I'm pretty sure it has something to do with the problem. It seems very strange that I get weird results when a calculation is made -- negative numbers like -132. Please help. I won't be able to demo this key part of my in presentation tomorrow at 9 pst, which is bummer.
I am attaching the whacky calculations it's making.
Luisa, been there and done that. The problem (I think) is that the first field you see with existing numbers are variables that have been transferred to this screen from a previous screen.
I have tried everything without luck including:
1. Creating a new event and following your instruction above -- field two is triggered by a tab after the data is input to make the calculation and display in field three. Result: a calculation is made with the wrong answer (ex. 2 -1 = 120)
2. Tried to add the above tab trigger calculation as an "add action" to the "Do" part of the variable event. Result: did not work.
3. Added an "interaction" from the"On page load" that populates the variable data display No luck.
If I remove the variable data event in the first field and manually populate the field with numbers it works, so I'm pretty sure it has something to do with the problem. It seems very strange that I get weird results when a calculation is made -- negative numbers like -132. Please help. I won't be able to demo this key part of my in presentation tomorrow at 9 pst, which is bummer.
I am attaching the whacky calculations it's making.
Hello David,
The calculations you are receiving are indeed bizarre. If you wish, you may send your prototype file to us.
In this way, it will be easier to understand the types of events currently in place and provide a resolution before your timeline.
Regards,
Luisa
Hello David,
The calculations you are receiving are indeed bizarre. If you wish, you may send your prototype file to us.
In this way, it will be easier to understand the types of events currently in place and provide a resolution before your timeline.
Regards,
Luisa
Check out this tutorial to learn how to create calculations in Justinmind.
Check out this tutorial to learn how to create calculations in Justinmind.
Replies have been locked on this page!