Hi,
I created a form where people can choose if they want 1 or 2 tickets. I have 40 tickets only available. I have no idea how to setup the form and the table so the form close when the 40 are reached....
Any ideas ?
Thank you !
Hi,
I created a form where people can choose if they want 1 or 2 tickets. I have 40 tickets only available. I have no idea how to setup the form and the table so the form close when the 40 are reached....
Any ideas ?
Thank you !
Best answer by kuovonne
Create a table of [tickets], with one row per ticket (40 rows). Have a single select that states if a ticket is available or not.
Link the table of [Tickets] to another table of [Ticket Choices]. This [Ticket Choices] has two rows: a row for "1 ticket" and another row for "2 tickets". Link both ticket choices to all the 40 rows in the [Tickets] table. Use a numeric field to state if row is for 1 ticket or 2. Use conditional rollups to see if there are enough tickets available. Use a filtered view to show only the rows where where there are enough tickets available.
Have a third table for [Ticket Requests] with the actual form. One of the fields is a link to the [Ticket Choices] table that is limited to the filtered view. Make this field a required field in the form. The form will not technically close, but if there are no ticket choices available in the view, users will not be able to pick a choice, and thus will not be able to fill out the form.
Finally, have an automation that runs when the form is submitted. Have the automation link the triggering [Ticket Request] to specific [Tickets] and set the single select to mark those tickets as taken. There will require some additional fields in the [Ticket Choices] to identify the first and second available tickets. I would use conditional rollup fields with regex to identify the first and second available tickets, but there are other methods. Another option is to use a script.
Note that this system does have some issues. If people submit their requests around the same time, with not enough time for the automation to run, two people could end up linked to the same tickets. Also, if someone leaves the form open for a long time, and you run out of tickets while the form is open, that person may still be able to submit the form. So this system is not a good fit for high-volume situations, or situations where a bunch of people will want to submit requests at the same time, such as right when the form opens. However, if you know that there won't be many requests and the requests will be spaced out in time, this will work without any third party services.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.