Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Exceptions in calculations?

Featured Replies

Hello again, my guiders of FM. Thanks in advance, you guys always come through. And I can't tell you how much I appreciate it.

This week's issue:

I have several fields with 'amount due.' (this is not an invoicing program). But still, i have several fields with amount due. and a Total Due field at the bottom.

this all adds up perfectly. however, next to the 'amount due' field. i have a "fee waived" checkbox field. i would like the check mark of that field to remove the corresponding 'amount due', out of the equation.

so that the 'Total Due' reflects the 'fee waived' checkmark.

I know there are a lot of 'if's' involved. can somebody maybe guide me in the right direction?

thanks a million.

Just make your Total Due a calculation of

Case( flagField1 <> "fee waived"; amount due1 ) + Case( flagField2 <> "fee waived"; amount due2 ) + ...

Or is it more complicated than that?

  • Author

either, its a little more complicated...or i'm a little more simple. probably the latter...

i'm in a portal. and the TOTAL DUE is just a SUM value. so the code is just Sum(amount_due)

there are options for each row to select the person, and their value. i just want the checked -fee waived to remove that particular amount due from the TOTAL DUE calculation.

sorry i might not be explaining it that well. let me know if that helps out at all.

thanks again Queue... (and for the last one, too javascript:void(0))

Ah, it involves a portal. In that case, put a calculation of

Case( flagField <> "fee waived"; amount_due )

in the table which contains the referenced fields. Then, change your Sum calc to reference the calculation field instead of the amount_due one.

  • Author

you're awesome Queue, however, i'm just not that familiar with the Case function yet, and i'm not getting accurate results. the checkbox doesn't seem to effect it. and the total only comes from one of the records in the portal.

i do appreciate your help, but i think, i might have some more learning to do before i can get this one working properly.

thanks again.

What is the value list that your checkbox field is based on? The value when selected must match that of the "fee waived" portion of the calc. If the value list isn't "fee waived", then change the calculation to match whatever the value is.

'The total only comes from one of the records in the portal.' Can you elaborate on this? Do you mean it should only come from one of the related records or currently is only coming from one related record?

Make sure your Sum calc in the 'parent' table references the portal's relationship. It should look like Sum(relationship::amount_due).

  • Author

let's see..

where you put

Case( flagField <> "fee waived"; amount_due )

what should i have for flagField ?

also, this might sound a little ridiculous, but what does <> say in a calculation?

  • Author

holy crap, i got it.

once again, you're the best...Queue.

anything us newbians, can do to help out experts like yourself?

Hmm. The only thing I can think of is to state your problems clearly and succinctly, so we don't have to dig through a long post to find the gist of it or ask a lot of questions to clarify the situation. If all questioners did this, it would be a lot easier on the regulars, IMO. But I doubt this is ever going to happen across the board, so...

Thanks for the thought.

I'll add to JT's comment some.

Worse than a long word explanation, is a one liner. It always makes me feel like I missed another post and I've come in at the end of a discussion.

Some questions are hard to explain and/or answer, so a sample of the file can be helpful.

When I write out my question, I usually discover the answer in the process. Why? That's because when I'm trying to explain my question logically so that others can understand it, it becomes clearer to me what I'm asking, and the answer follows.

Things that you want to be sure and cover:

What is the problem or question as you see it?

What are you trying to accomplish.

What FileMaker functions or features are involved ? (i.e. calculation, script, global, layout, etc.) Very seldom is it a version of FileMaker problem.

Are you making it more complicated than it really is? (nothing like having someone else point to a basic function for a fix. blush.gif

Be sure to include what things you have tried? (i.e. a copy of the Script, Calculation, and a File if necessary)

Do a search for your keywords.

Use the tips you will find above where you type your Keywords [color:"blue"] Keyword search terms (Advanced search tips) There are better ways then just typing in a couple of Keywords.

Read the articles in the [color:"red"] How to use FM Forums / Self Help Topic Area at the bottom of the Main Page.

HTH

Lee

  • Author

no problem at all. you guys should have a title topic with conduct advice for newbies. anything that would make you guys feel like your time is more worth it. because it is.

thanks again.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.