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

Featured Replies

I have a database for a private music teacher and we're trying to have it automatically keep track of lesson charges based on the number of students in each family, the length of the lessons, and the charge per lesson at a rate per half hour. I've been using simple calculations that work fine if each lesson is the same length. Now we're having to deal with lesson lengths that can vary from student to student, either 30, 45, or 60 minutes. I've set up a field for the lesson length formatted as radio buttons with each one of these values and I'm trying to complete a calculation based on these fields:

Count - the number of students in the family

Lesson Length - 30, 45, or 60 minutes

Lesson Charge per half hour

This would seem to be a good place to use the Choose function, or perhaps the Case function, but nothing I do will return the calculation based on changes to the Lesson Length field. I either get no result, or there is no change if I switch the Length buttons.

I'm sure it's probably a very simple oversight on my part.

Here is the formula I've been working with:

Choose ( Lesson Length = 30 ; Count * Lesson Chg * 1 ;

Lesson Length = 45 ; Count * Lesson Chg * 1.5 ;

Lesson Length = 60 ; Count * Lesson Chg * 2 )

Any help is greatly appreciated.

Your formula will work fine if you use Case instead of Choose.

If it will always be increments of 15 minutes, 15, 30, 45, 60, 75, 90, etc then it may be better if you use a simple calc like this:

Lesson Length / 30 * Count * Lesson Chg

or

Div ( Lesson Length; 15) * Count * ( Lesson Chg / 2 ) will charge in increments of 15 minutes. So, 40 minutes & 44 mins will still be charged at 30 minutes. Only when it hits 45 minutes will it charge for 45 minutes.

I just noticed that after I posted, but you beat me to it. Nice one.

  • Author

Unfortunately, I did that earlier, and just now after reading your post, and the result is a blank field. Nothing. Is there some slight syntax error I'm missing?

J D Thomas

ThomaStudios

  • Author

Aha. First off, thank you for the great suggestions. I was dealing with an mistake on my part that I didn't realize until this morning. For some stupid reason I had the Lesson Chg field formatted as a repeating field, which was totally unneccessary.

All the suggestions are working fine now. Plus, I learned something.

Thanks again.

J D Thomas

ThomaStudios

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.