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

Question

Question

Allowing only one instance of a form to run.

asked on January 26, 2021

I know through workflow administration it is possible to limit a workflow to a single instance. Is it possible to do the same with a form? We have a form that should exist only as a single instance ,unfortunately the users don't check to see if there is one already open and will submit one whilst the other is still open. It would be good if I could put some sort of mechanism in place to stop the above happening.

Thanks

 

0 0

Answer

SELECTED ANSWER
replied on January 26, 2021

There's no out-of-the-box solution for this, but aside from querying the Forms database, one thing I've played around with is just creating a simple external db with the following process:

  1. Hide the built-in Submit button with CSS (.Submit {display: none;})
  2. Add a custom HTML Submit button with javascript to trigger the normal submit button click
  3. Add a lookup to check my external table for existing instances
  4. Using Field Rules
    1. If instance found, keep the button/form fields hidden, show a message
    2. If no instance found, display the form and custom submit button
  5. Upon submission, run a workflow to populate the table "flag"
  6. At the end of the process, run another workflow to clear the database flag
1 0

Replies

replied on January 26, 2021

I don't believe there is any out of the box functionality for this in forms. 
Off the top of my head you would have to query the Forms DB on form launch to see if a form was already running, and if so, have a condition in your form to Display a message and hide the submit button so they couldn't submit another until the first was closed.

Would take some DB investigation if this could be accomplished

1 0
replied on January 27, 2021 Show version history

Thanks Steve and Jason, that has given me a few ideas and a direction to follow. Have created views to interrogate the forms database so might not be as hard as I thought. Thanks again.

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

Sign in to reply to this post.