Jump to content
Server Maintenance This Week. ×

How to count values in fields within each record?


This topic is 7934 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

This topic is 7934 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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