Jump to content

A huge script problem...

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

Recommended Posts

My problem is simple. I have a web published database which includes 4 databases. It is a college end-of-year class evaluation system. The user logs into the student database, chooses their course from a course database, then takes the evaluation in a evaluation database which includes questions from a question database. My problem is this script. I have been able to find xsl and xml solutions to get around my other filemaker scripts that I have used but not this one. I am using a global field for portals to pass on information to the evaluation database and globals do not work with multiple users on at the same time. So here is the script:

1) Set RegistrationIDGlobal in Evaluation Database to RegistrationID in the Course database.

2) Go to layout (questions portal)

3) Go to portal row (select, first)

4) Set field (gcounter, 0)

5) Loop

New Record

Set field (gcounter, gcounter + 1)

Go to portal row (gcounter)

Set field (QuestionID, zk.constantQuestions:QuestionID)

Set field (RegistrationID, RegistrationIDGlobal)

Exit loop if (gcounter >= cnumber of questions)

End loop

A quick review of what each step does:

Set registrationIDGlobal in Evaluation Database to RegistrationID in evalcourse. The registrationID is simply a way of administrators to keep track of who has taken an evaluation. It consists of the PIDM (a personal student ID) and the course ID (ex. math 303). I am setting the global in evaluation database for the future part of this script.

Go to layout (questions portal). I know this is easily done with -lay. I am using this primarily to get the info from the portal for future steps in this script. I have placed the portal in this layout.

Go to portal row (select, first). In the portal there are all the questions from the questions database. In this script step, I am instructing it to go to the first question.

Set field (gcounter, 0). gcounter is a global field and is used to set the questionID which is used in one of my relationships in Evaluation Database in order to get the question there. gcounter increases later on by way of the loop and therefore I am able to use this relationship.


new record. I start the loop by adding a new record to the evaluation database. Each record in here consists of a question and response and the registrationID.

set field(gcounter, gcounter + 1). Here I am increasing the global field to the next QuestionID.

Go to portal row (gcounter). I am getting the question in the portal based on whatever gcounter equals.

Set field (QuestionID, zkconstantQuestions:QuestionID). Based on the current row in the portal, I get the question ID.

Set field (RegistrationID, RegistrationIDGlobal). With the global that contains the RegistrationID from the Course database from before, I set the RegistrationID in Evaluation database to equal whatever is in the global.

Exit loop if (gcounter >= cnumber of questions). The loop is finished and I stop adding records if the global gcounter( which is increased by one every time) is equal to the number of questions in the questions database.

End loop.

My problem is the globals with multiple users on the internet. I have tried the process with two users at the same time and it added 2 times the amount of records in the evaluation database as I wanted. Also I have been told not to use scripts on the web but I do not see a way around it with this script.

Any help would be greatly appreciated.


Link to comment
Share on other sites

  • 2 weeks later...

What about ASP? My college is using ASP as a standard so I have to use it to instead of PHP. I know its possible as I have seen a little bit of resources out there but no where near as much as PHP and the FX.php class. It will just take a little extra work is all...

Justin Grewe wink.gif

Link to comment
Share on other sites

This topic is 7479 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.