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.

Function Problem

Featured Replies

  • Newbies

Intro:

Hi, everyone. I'm glad to find such a vibrant community centered around FM. The included tutorial is lacking somewhat.

Background:

My database is designed around hours taught, classes, student evaluations, departments and professors. I work for a Med school.

We're trying to create one which includes the following fields:

First Name, Last Name, Department, Section (example: Renal, Cardio, etc...), Evaluation (student scoring professors on a scale of 1-5), Course 1, Course 2,... Course 5, Lecture Hours, Small Group Hours, Total Hours, Department Hours.

Each professor gets an individual record page. I've managed to create a separate layout that shows hours by department but doesn't sum them.

I am trying to set up a script which will auto-sum the Total Hours by Department. For example, I press on a button labeled"Bio Med Medicine Hours" and the records will return in a layout which has columns of "last name" and "total hours".

TL;DR:

I'm trying to script summing fields. Do I need to create a self-relation portal to do this?

Thanks in advance for your replies.

Welcome to FM Forums!!

Background:

My database is designed around hours taught, classes, student evaluations, departments and professors. I work for a Med school.

We're trying to create one which includes the following fields:

First Name, Last Name, Department, Section (example: Renal, Cardio, etc...), Evaluation (student scoring professors on a scale of 1-5), Course 1, Course 2,... Course 5, Lecture Hours, Small Group Hours, Total Hours, Department Hours.

I'm afraid we don't have enough information. You should have a table (or file) for Students, Classes, Professors etc ...

What it appears that you want is a combination of several tables so you wouldn't need FIELDS for this already-existing information - you would need a relationship to those various tables.

But you posted in Custom Functions so I'm unclear on what you really want. In addition, we'll need to know what your structure looks like. It would help to post a cloned, empty version of your solution or a sample file showing what you are working with. :smile2:

Hi See.Rad, and welcome to the Forum.

First let me start by saying, this is one of the most readable First Time Post that I have seen in the many years I have been a member of this or any other list.

[color:red]LaRetta made excellent points.

I too think if you Post a file, it will make it easier, quicker and more accurate in our replies to your need.

BTW, I notice you mentioned a script need also. Often a question will include several functions in it, so it isn't easy to figure out which one best fits the question. To tell the truth, it doesn't matter which Topic it is, as long as ONE of the Function mention fits into that Topic.

HTH

Lee

[color:red]p.s., if you miss it by a lot, we can always move it for you.

Edited by Guest
p.s.

just make a new field (Summary type)summarizing your hour field in your hours table, and use that related Summary field in your layout it will display the sum of hours

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.