Jump to content

Random number password problem


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

Recommended Posts

  • Newbies

I would appreciate anyone's help with this problem. I am a school teacher creating a Filemaker 4.0 database where students can vote in the upcoming Presidential Election. I am somewhat familiar with FMPro 4.0 but cannot come up with a calculation for the following problem.

Students register to vote and are assigned a password using the random number calculation. They will then return to the database during election and enter the random number generated earlier as their password. In order to keep students from voting more than once, I would like to perform some type of lookup or calculation that will match their password once, but then lock them out if they try to use the password a second time.

I am going to have over 1000 students voting at various locations (I'll be custom publishing the database into html) so password control is important for a valid voting experience.

Suggestions, questions, comments would be most appreciated.

T. Miller

Link to comment
Share on other sites

quote:

Originally posted by tomtom:

I would appreciate anyone's help with this problem. I am a school teacher creating a Filemaker 4.0 database where students can vote in the upcoming Presidential Election. I am somewhat familiar with FMPro 4.0 but cannot come up with a calculation for the following problem.

Students register to vote and are assigned a password using the random number calculation. They will then return to the database during election and enter the random number generated earlier as their password. In order to keep students from voting more than once, I would like to perform some type of lookup or calculation that will match their password once, but then lock them out if they try to use the password a second time.

I am going to have over 1000 students voting at various locations (I'll be custom publishing the database into html) so password control is important for a valid voting experience.

They log in with the password. You put the password in a global field. Have a relationship which is the globalPassword to recordPassword (which you would have assigned when they voted).

Then test this relationship. If it is valid, they have already created a Vote record and should not be allowed to do so again. If it is not valid, they they have never voted and can go ahead and vote.

The idea might seem complicated, but it pretty simple. You just need to test and see if a record already exists or not.

P.S. Do this via scripting, so that you can control what happens within your interface.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected] http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

[This message has been edited by captkurt (edited September 24, 2000).]

Link to comment
Share on other sites

  • Newbies

Thanks for your help. I really appreciate it! Conceptually I can follow your advice and but I'm not sure how to translate it into a script.

I figure that I will have to copy and paste the information entered under "password" into a "globalpassword" field. From there I will have to perform a find, which will look for duplicates of the entered password (using the information from the global field) and allow the user to go on to another layout if there are not duplicates or to an error page if there are duplicates.

I guess I am stuck on the find concept, because if I do a "perform find" which looks for passwords, does my "if" statement check each password found, or just the first one it finds? Should I have a "find all" command before my "find duplicates" command?

Am I on the right track?

Any help you could provide me would be most appreciated.

Link to comment
Share on other sites

quote:

Originally posted by tomtom:

Thanks for your help. I really appreciate it! Conceptually I can follow your advice and but I'm not sure how to translate it into a script.

The solution opens to a layout where the student is prompted to to select thier vote in a global field (gVote) as well as needing to enter a password into a global field (gPassword) and then press the vote button.

First use a relationship from the Vote file to your Student file (where gPassword = Password) and check to make sure that this relationship is valid (i.e. IsValid [studentFile by Password::Password]), if not send them to the StudentFile and make them create a record.

Second use a self relationship from the Vote file to the Student file same as above (where gPassword = Password) and check if this is valid (i.e. IsValid[self by Password::Password]), if it is the student has already voted and a message can inform them of this, clear the globals and send them back to the voting screen. If the relationship was not valid, then process the vote by creating a new record and use SetField[Password, gPassword] and SetField[Vote, gVote] to set the vote results.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

  • Newbies

I'm so close I can taste it!!! Thanks for all your help. The first part of your advise works great, but I am having problems with the second part. If I create a self-relationship within the Student file that checks the password (IsValid [studentFile by Password::Password) against itself, won't it find itself and always return "true"?

The way I have everything set up is as follows. Again, any help you can give me would be most appreciated.

Database #1 Student Registration (stureg)

This database if for students to register to vote. It has a field that generates a random number which is then added to passwords which is a value list.

Database #2 Student Vote (svote)

This database starts out with a layout for the student to enter their password (into a global field called gpassword). This is then checked against the password value list from stureg. If the password matches, the student is taken to a second layout that shows their name, school, and teacher. From there they will be prompted to verify their information and go to the voting page. If the student's password is incorrect, they will be taken to a third layout that shows them an error message with instructions on what to do.

(Everything up to this point works).

In the script that is activated when the student enters their password (on the first layout) there is a second if statement, which runs if the password is valid (from stureg) and checks a relationship between the gpassword and the password. This is supposed to check that the student has either voted already or has not voted already, based on the information contained in the password field (this is where I am stuck, not sure how the isvalid command can check all the different passwords entered).

I used a value list for the first password check, it works great, but I can't seem to duplicate that success with the gpassword/password relationship within the svote database.

I hope you can help me?

Thanks again.

Tom Miller

Glenwood Middle School

Link to comment
Share on other sites

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