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 6184 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

My calculation is as follows: GetAsNumber (Appointment Type). I cannot figure out why my GetAsNumber function keeps returning negative values.

For instance, the following text: Diagnostic Interview (90801)

returns the value of: -90801

and I want it to return: 90801

Any ideas as to what I'm doing wrong?

Thanks in advance!

Posted

"(56)" means negative 56 in accounting. GetAsNumber apparently is interpreting that. You could try applying Filter first:

  GetAsNumber( Filter( Appointment Type; "0123456789"))

Posted

Shawn, can you explain why you still used GetAsNumber()? Wouldn't Filter() by itself have produced the same thing in this instance? I thought originally it might be because many diagnoses can contain a decimal (DSMIV, for instance) but even that wouldn't make a difference in this situation; neither would minus.

You simply don't do things without reason but I can't spot it and I want to understand! Can you help me out?

Posted

Filter ( "Diagnostic Interview (0123)" ; "0123456789" ) = "0123"

GetAsNumber ( Filter ( "Diagnostic Interview (0123)" ; "0123456789" ) ) = 123

BTW:

Abs ( "Diagnostic Interview (0123)" ) = 123

Posted

Oh, well, leading zeros I suppose - if they should be dropped off.

That's a good reason but I didn't even think it over - the original was returning a number type so I was just sticking with that. :

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