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.

Performing multiple finds in a separate related db

Featured Replies

  • Newbies

I have two related databases. One (X) has a record for every lesson every teacher teaches in one week (several thousand records). The other (Y) to calculate the total number of specific lessons performed by each teacher (there are 70 teacher records) I am trying to use a summary field in (X) that counts the number of specific lessons (after performing a find for one teacher). I need the (Y) to perform a script in which it opens (X) performs a find on teacher A then transfers the summary field value across to A in (Y) and then returns to (X), performs a second find for teacher B, etc. etc. How do I write a script in (Y) that can continually change the Perform Find request (for (X)) for each of the 70 teachers rather than me typing in each teacher for every find?

Hi,

All this seems rather complex procedure, compared to what relationships would do in this case.

"I need the (Y) to perform a script in which it opens (X) performs a find on teacher A then transfers the summary field value across to A in (Y) and then returns to (X), performs a second find for teacher B, etc. etc. "

Count(RelationshipToA:LessonID) would be a calc, which you may transfer to a number field at wish.

It's just a matter of how you define your 'RelationshipToA', but from I understood, the goal is to grab the total of related records for a specific lesson for each teacher.

So the key on the right side (your related file) would be :

cCompound = LessonID& " "& TeacherID

The Key on the Left side would be :

cgCompound = gLessonID& " "& TeacherID, gLessonID being a global field, where you'd input the exact lesson you're looking for.

Of course, you could include a Year, or any other parameter to this compound if you needed to reduce the foundset.

HTH

  • Author
  • Newbies

Thnakyou but I'm still not sure whether that will work as the different lesson fields may contain "11CH", "11PH", "10SC", "8EN" "9CO", etc. (I import these from our ancient school timetable program) What I'm trying to count is the number of 11 and 10 classes taught by each teacher no matter what type ie. PH, CH, etc. I originally planned to use a summary field that also used the Left function to cut it back to the first two letters ie. "11" Anyway I'll give it a go and see what happens.

Sorry, I skipped this post.

In this case, a Sum ( ) should work with this code converted to TextToNum(MyCode).

Actually, I'm not sure if a standard Sum( ) wouldn't work as well.

Ugo

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.