I recently discovered a function that was previously undocumented. The function,
countnameudfs, counts the number of registrations that have certain name UDFs associated with them. But when using it, I found that there was a bug in it, so that is fixed in 8.0.027. Considering that no one brought the bug to my attention before now, I don't think that anyone is using it.
In the case that I needed it for, I counted the number of registrations in a course that had a certain grade and they had a certain number in a numeric name UDF field. I utilized the function in something like: countnameudfs(cocrse,"nudfn1=580106 and val(register.rggrade)>=65"). So the parameters I am passing are the course number in the report and then my criteria as a string. I had to use "register." when referring to a field in the register table. It also assumes that numeric grades are assigned to these registrations.
There are two other functions that are similar to this one. Countreg counts registrations with the criteria just going off of the register table. In my previous example, if I didn't need the nudfn1 requirement, then it could be
countreg(cocrse,"val(rggrade)>=65"). Notice that I didn't need the "register." in this function.
Another function is the countname function. This is closer to the countnameudfs function in that is looks at another table for criteria when counting the registrations. Maybe you need to count everyone in a course that is male and has a certain grade. That would look like countname(cocrse,"nmsex='M' and val(register.rggrade)>=65").
With all of these options to count registrations, there should be one that meets your statistical reporting needs. Get with your technician and visit the help guide to find out more about these functions and others that may meet your needs.
Contributed by Matthew J. Olson