Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

Hello everyone

Here's the challenge, I need to be able to add numbers together within a field i.e. "27" = 9 or "11.2 11.7" = 4.9 basically reducing the value to it's simplest number. I'm not that well versed in math calculations or formula's but there must be a way to do this in FM?! FYI, This will be used in a Lab for determining patient results, but there will be many values (that need this calc done on them or the whole thing is a bust) within a table.

Thank you

Arthur

Posted

If you don't mind typing in operators, e.g.

"2+7" and "11.2+11.7", then you should explore how the Evaluate[] function works. Look in FileMaker Help.

If operators need to be implied, then you'll want a Substitute[] function as well, e.g.

Evaluate(

Substitute(myfield;" ";"+")

)

The first is obviously more flexible since the user can type in any mathematical formula.

Posted

Well, 2+7 returns 9, but 11.2+11.7 returns 22.9, not 4.9 as indicated. I don't know what "reducing the value to it's simplest number" means. Perhaps it's just summing all the digits, unless there's a decimal point - that's the only way I can see of getting 4.9 from "11.2 11.7". But I cannot imagine how this would be useful in any context, and I am concerned for the well-being of the patients using this lab.

Posted

Well, it does add up that way. I have to say the logic is a little obscure. How the heck do you differentiate between "11.2" as a number versus "11.2" representing a statement to evaluate (1 + 1.2)? Only the poster knows.

Posted

Maybe because the OP isn't paying that much attention to the spacebar when posting? Who knows? And does it really matter? Either your first comprehensive answer will suffice or he'll clarify the logic.

Posted

Maybe because the OP isn't paying that much attention to the spacebar when posting? Who knows? And does it really matter? Either your first comprehensive answer will suffice or he'll clarify the logic.

It doesn't matter at all. I just worry and nibble at things long after they cease to be important. It's a personal failing.

Posted

Hi Arthur,

i.e. "27" = 9 or "11.2 11.7" = 4.9

Can you give more information about this? I assumed the first one is "2+7=9" and the second one may come from "1+1+1+1 . 2+7 = 4.9"? Is that right? :qwery:

  • Newbies
Posted

Hello Henry

Yes to the way you added things up. the numbers represent seconds (time value) they are response times of the patients. However inorder to use them they must be reduced. another example. 64 6+4would equal 10. just as 2008 would 2+0+0+8=10. these time results are then used with other variables at the end to make sense of the data collected. I am very appreciative for all the responses WOW. if this is not clear enough I will attempt another example. Most of the other variables are simple addition, division or averaging. between other sets of numbers. The weird thing here is doing it within the field (1111) or a set of field (111) + (222)+(333)= 18. thanx again

Arthur

Posted

Let me make a suggestion: get whoever inputs the data to input it correctly. It seems that in this case correctly means a new record for each entry. That's where the real problem is, IMHO.

Posted

He must mean summing the values 1, 1.2, 1, 1.7 and summing the values 2, 7.

... or redux first number & "." & redux second number like:

11.2 -> 4

11.7 -> 9

so 4.9

... or redux Int ( first number ) + redux Int ( second number ) like:

11.2 -> 2.2

11.7 -> 2.7

so 2.2 + 2.7 = 4.9

Posted (edited)

So there will never be a single number greater than 9? I agree with Comment ... this is very funky way of handling it. And what if the User puts a[color:green]n extra space or some other character?

Update: Added the green for clarity

Edited by Guest
Posted (edited)

Wow, not only that but the logic is totally whacky.

11.2 11.7" = 4.9

And what if it is 11.99 11.9? It should equal 4.108? Does it ever round? Is it a decimal or some meaningless second number?

Danielle, your last calculation seems to produce strange results on the example 11.2 11.2. I get 2.2112.

None of this makes any sense to me at all. Sorry. :crazy2:

Edited by Guest
Fixed typo in calc example
Posted

the numbers represent seconds (time value) they are response times of the patients. However inorder to use them they must be reduced.

Why must they be reduced to this shorthand notation? Is this some kind of standardized shorthand notation used in your industry? Or is it some clever idea someone came up with in your department?

If it's standardized, can you point us to the standard? I'm curious, and looking at the actual standards document would probably clarify.

This topic is 6178 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.