September 11, 200322 yr Help!!! I need to automate the count of students attending a certian training class and return the data to the request form to verify class availability. My request form is in a separate file that I can script to open my class roster file. The class roster file contains all the records for all classes. I want to find only those classes that match the class ID from the request form, which is the last record in Browse mode on my roster file. So, as a human, I can see the class id in Browse mode and enter that information in find mode, which produces my desired result. But I need to automate this function. I already have a count calculation and class status defined. Please help. Thanks, Shari
September 12, 200322 yr You can use is the Count function. It is available in the Aggregate section of the calculation functions. It works across relationships also. I cannot tell from the above exactly what your file structure is. There is really only 1 correct structure to handle classes and students; and that is with a join file with an entry for each unique student-class combination. Probably this is your class roster file. There would be a ClassID in this file. From any other file a relationship could be built using either the ClassID (if it exists in the file) or a global field temporarily holding a ClassID choice (if it does not, but you still want to see the count; the data can also be entered into globals, to see and test the count, before commiting the entry to regular fields). The count would then be Count(ClassID relationship::ClassID) or Count(ClassID global relationship::ClassID). (ClassID above could be any field that you are sure contains data, the count will be the same.)
September 12, 200322 yr Author Thank you. However, my question is not with the count. I have that part figured out. What I am asking is help with a script to capture the data from my class ID, the individual record that is returned from my roster file and automatically populate that data or record into my class ID in my find mode. When I manually type the information it brings up all records with the same class Id. All I want to do is automate this task. Shari
September 12, 200322 yr Create a global field: gFindText, as a global text field. (You can do the same for a number or date field.) In your script, do the following: Set gFindText to the field you want to search (ClassID) Enter Find (with no pause) Set Field (searchfield) to gFindText Perform Find (without dialog or restore request) You can also do this with copy/paste commands, but I like to use the global field approach.
September 12, 200322 yr Author Thank you so much. It worked. That's what happens when a Project Manager is tasked to design a database.
Create an account or sign in to comment