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

Recommended Posts

Posted

I have a portal that filters records for students absences. Two fields that are important are "Credit" and "Abs_count"

Credit is either 1 or .5

Abs_count is the total absences over a certain allowed amount.

1 credit = you are only allowed 18 absences

.5 = you are only allowed 9 absences

I am trying to do a calculation that will look at the credit field and see if it is "1" or ".5" then take the appropriate number either "18", "9" and subtract from the total abs_count.

I have looked a IF statements and Case and having a problem with both. I made a field called "MakeUpHours"


Case (

Get ( Credit ) = 1

- (abs_count) = Sum



Get (Credit ) < 1

- (abs_count) = Sum

)



As you see I am a complete newbie with calcualations. Can you point me in the right direction? Thank you.

Posted

Try:


Case ( AbsCount ; Let ( deduct = Credit * 18 ; AbsCount - deduct ) )





I wrapped with case so that it would not evaluate unless there was a value.  If your business rules require a different result If one or both fields are empty, let me know.   :-)



Or without the Let() since it really isn't needed:





Case ( AbsCount ; AbsCount - Credit * 18 )

Posted

I should explain if you are very new to calculations ... deduct is not a field - it is a declared variable we are using only within this calculation. you might want to use my second calc since it is clearer and more efficient.

AbsCount and Credit are fields.

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