mleiser Posted September 9, 2013 Posted September 9, 2013 Just like in a date filed you can have it that you click on the data entry box and a calendar pops up, from which you can choose a particular date, in a number filed, is there a way to get a calculator to pop, so you can calculate the value you want to put in the data entry box as a plain number?
eos Posted September 9, 2013 Posted September 9, 2013 Use a global field, a layout, a small (modal) dialog window, a script, and Evaluate() / EvaluationError () to enter expressions in free-form and transfer the result into your field of choice. Of course, if you have higher aesthetic standards and/or time, you could build a small pocket calculator, complete with buttons and “LCD” display …
mleiser Posted September 10, 2013 Author Posted September 10, 2013 Thanks, but beyong my abilities. Guess I'm actually less than intermidiate. Thanks for the comeback.
eos Posted September 10, 2013 Posted September 10, 2013 Guess I'm actually less than intermidiate. That is because 'e' comes before 'i'. In the meantime, here's a quick sketch; no warranties whatsoever on this gadget, though. Calculator_eos.fmp12.zip
mleiser Posted September 10, 2013 Author Posted September 10, 2013 That is because 'e' comes before 'i'. In the meantime, here's a quick sketch; no warranties whatsoever on this gadget, though. Can you imagine how I would spell it if I wasn't working in a school!! Thanks a lot for the zip.
bruceR Posted September 10, 2013 Posted September 10, 2013 eos: that seems like a nice little example but I am wondering why it can handle decimals. If I enter 45 + 3 that works. If I enter 45.1 + 3, it fails, even though the evaluation error is zero.
eos Posted September 10, 2013 Posted September 10, 2013 eos: that seems like a nice little example but I am wondering why it can handle decimals.  If I enter 45 + 3 that works.  If I enter 45.1 + 3, it fails, even though the evaluation error is zero.  I guess you mean can't ⦠it works here (as I said: no warranties â¦).  Using the system decimal character (which for me normally is a comma) gives a result with decimal places.   I even switched to using a period as in your example, which also works as expected.   What result does the Data Viewer evaluate your expression to?
bruceR Posted September 10, 2013 Posted September 10, 2013 The $error variable is set to 102 field missing. Apparently the file is set up with european number formatting and cannot handle decimal values. The result of the calculation is "?" If I use a comma instead of decimal point your file works correctly.
mleiser Posted September 11, 2013 Author Posted September 11, 2013 Thank you so much for the zip file again. I modified it to my needs and it works beautifully.
No_access Posted September 11, 2013 Posted September 11, 2013 Just for anyone who does not know, if you change change the default language of the field to English instead of German the decimal will work just fine.
Recommended Posts
This topic is 4092 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now