e3digital Posted February 1, 2005 Posted February 1, 2005 I'm running a script that compares the "looking for" data (a teacher's name) to 10 different fields in a record, and, via a loop, across all the records. When the appropriate records are found, it displays some related data for the found teacher. Until recently I believe it has been working correctly. Lately, however, it's been naughty! :-) The script itself runs without error, but when it displays the data, it sometimes shows the wrong info. A little more background...Each record is a student in Special Ed. Each student can have up to 10 different teachers working with him/her. For each teacher, we list the amount of Direct Time and Indirect Time spent with the child (for state reporting and billing purposes). The script first asks the user to enter in a global field the name of the teacher they are looking for. It then compares the global field to the fields "teacher1", "teacher2", "teacher3", etc to find the students that teacher services. Once the students are found, it displays the student name as well as the "DirectTime" and "IndirectTime". The problem is, it's not always pulling the correct time. For example, Teacher B sees Student Z for 40 minutes. In the display after the script is run, it might display 90 minutes, which is the correct time for Teacher A. The data is not changing...on the Data Entry layout Teacher B is still listed for 40 minutes. The next time we run the script, it might be correct. It seems to be totally random--sometimes it works, sometimes not. Sometimes it displays the time for Teacher A, others for Teacher D. The student, teacher, school, times, ... none of it seems to be consistent as to when it works. It was running across a network using FMServer on a Mac G3 server. Yesterday we moved it to a PC server (don't know the OS), but today we're still getting problems. I would sleep so much better if someone had a clue about what I could try. Thanks, Susan
Ender Posted February 1, 2005 Posted February 1, 2005 Hi Susan, I think we would need to see your script to be able to advise specifically. I would think the find process would create a find request for each of your 10 Teacher fields, but it's not clear if this is how you are doing it, nor is it clear how the results are displaying the matched Teacher Names and Times. Structurally, it is usually better to put unique entities (like Teachers) into a separate file, and repetitions of those entities into separate records in a join file (like an Assigned_Teacher file to hold all the Student-Teacher joins.) This would give you more options for finding and viewing the list of Students for a Teacher (simply use a portal of Assigned_Teacher records in a layout in the Teacher file.) I'd recommend changing your structure to use these separate files. However, if you still want to try to get your current structure to work, please post the text of your find script and, if possible, a screenshot of your results layout.
Oldfogey Posted February 2, 2005 Posted February 2, 2005 Susan, I'm not as polite as Ender. I think your structure is wrong. My guess is that your script is not returning the correct data because your relationship is not specified correctly or you are getting more results than you expect. The fact that it seemed to work before suggests that the addition of more data has simply made the error obvious. Can you describe your structure? Naughty scripts should be bashed into submission!
e3digital Posted February 9, 2005 Author Posted February 9, 2005 Thank you for your feedback... I agree that the structure is not good. I inherited it and haven't had the time or green light to modify it. In the meantime, there were some extra characters (spaces and carriage returns, mostly) that seemed to be causing some problems. I removed them and haven't heard from the client since. When my current project ends I am going to lobby for a new structure and learn more about join files. Thanks again, Susan
Recommended Posts
This topic is 7226 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 accountSign in
Already have an account? Sign in here.
Sign In Now