Jump to content

Calculator


mleiser

This topic is 3904 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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 …

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

post-80889-0-65850600-1378849035_thumb.p

 

I even switched to using a period as in your example, which also works as expected.

 

post-80889-0-42099000-1378849053_thumb.p

 

What result does the Data Viewer evaluate your expression to?

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

This topic is 3904 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.