You are viewing limited content. For full access, please sign in.

Question

Question

Can you restrict duplicate submission?

asked on August 8, 2018

We would like to have some employee tests in forms. Is there a way to restrict submission only once per ip address? This would at least keep someone from sitting down and doing the test repeatedly on the same device. 

0 0

Replies

replied on August 8, 2018

If this isn't anonymous, I would have a 2-step verification built in at the start of the test.

--Could use DOB and Employee ID

When verified fill hidden field with the 0 or 1 from DB column, 0 being they haven't taken and 1 they have.

If 1, then you can hide all and show message they've already taken test.

If 0, they take test and store in a database for user and set column value to 1 from 0.

 

0 0
replied on August 9, 2018

It is not anonymous, but that would still allow 1 device to take tests for multiple people. Every employee is issued an iPad, and they could take the test on their own device. I like the database lookup to hide all in it has a 1 count, and i could add the ip to the database. 

0 0
replied on August 9, 2018

How can you increase the count in the database?

0 0
replied on August 9, 2018

When the user submits the form.  Invoke a workflow.

When running SQL Queries, I tend to like Try-Catch to monitor any possible disconnect from the SQL Server.  I track all the information and send an Email to myself to know a failure needs my attention.

The Query is straight forward.  I like to do a row check within my query as this will only index once if the row does not exist.  This helps avoid any duplicates.

UPDATE Table1 SET (TestTaken=1) WHERE UserName='@SomeValue' and DOB=@SomeDate
IF @@ROWCOUNT=0
    INSERT INTO Table1 (UserName, DOB, TestTaken)
    VALUES (1, '@SomeValue', @SomeDate)

 

If you are controlling your submits from the Form level, your workflow can just write the 1.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.