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.

How to count values in fields within each record?

Featured Replies

I have databases containing students' responses to test items. Each record in the databases corresponds to a student. 40 of the fields in each database correspond to test items. The values in these text fields are "correct" or "incorrect."

How can I programmatically count each student's number of correct items on the test? In other words, I want to count within records, not between, the total number of correct items.

Many thanks in advance for any pointers!

If you have a calc field for each question that it's results returned "1" for correct, and "0" (zero) for incorrect, you can then have a "Total Correct" field for each record that is simply:

Question1 + Question2 +Question3 +Question4.... etc...

It will add up each correct calculation for a total number correct.

The 1 or 0 option is one that I make use of. I would also recommend putting test results into their own database, e.g. Test_Results.fp5, where each record is one test answer, related to the student by the student's unique key. Then, getting the total correct responses would be as simple as using the Sum() function. The next step beyond that would be to create a join file, say, Tests.fp5 which would allow you to track multiple tests and their results for each student.

  • Author

Many thanks for the helpful suggestion. I'll give it a whirl.

Cheers!

  • Author

It worked perfectly!

Many thanks.

  • Newbies

An alternative way of doing it is using PatternCount e.g.

PatternCount(answer 1 & " " & answer 2 & " " & answer 3 & " " & answer 4 & " " & answer 5 & " " & answer 6 & " " & answer 7; "Correct")

/Keda

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.