Jump 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.

Featured Replies

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.

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 )

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.

  • Author

You are fantastic. It worked perfectly. Thank you.

Create an account or sign in to comment

Important Information

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

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.