Limit the number of records in a table

  • 1
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I am building a table to register applicants in a program that will occur over multiple dates, but want to limit the maximum number of registrants to "15" for any date.

I was going to build a table with 15 blank records, allowing the registrants only access to modify an existing blank record, and once all of the blank records were filled, well registration would be filled as well (pretty simple except as we are using relationships, I would have to build 15 similar relationships)

Is there a simple method to incorporate such a limit and allowing the registrants to create a record when registering?

Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I suggest a Parent child setup.

The Parent would be called Tournament Date
The Child table would be Registrants

So you would set up all the Tournament Date records yourself.

On the Relationship, set up a summary count of the number of Registrants.

Then all you need to do is to edit the Add Child (Registrant) URL formula field to put an IF around it.  That way when you hit 15, the button will go blank.

iF([# of Registrants] < 15, existing formula goes here)
Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb
Thanks Mark, I saw this similar on a post, I am going to give it a go this morning, but where do I find the Add Child (Registrant) URL to edit?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
When you create the relationship, it always creates the button to Add child.
Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb
Oh yes, now I know what you are referring to.  I was thinking the big green button that appears at the top of an add form.  Thanks and I will give it a go.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
You will want to change the Role UI settings to suppress that Green ADD button on the Child tale.  The only way to launch the creation of a child record should be off the Parent Tournament Date record.
'
Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb
Thanks again Mark, just set up a quick test and I think this is going to work perfectly.  You are indeed a life-saver AGAIN!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
:) Thx
Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb
Mark, not related to this thread, but is there a way to build a formula that compares results from two different records in a  table to create a result.  Trying to wrap my head around a methodology to build a tournament ladder (we use them for golf matches, but also for pretty much any form of tournament).  Jeff
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I would need to know more about the use case, maybe with an example.  My first thought is that you are gong to need to summarize results up to the Player level with different summary totals to show how they did in various Tournament events
Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb
What I am actually working on is a hockey tournament schedule.  You have multiple games scheduled for the day and for simplicity lets say each game is record, so the record contains the following fields  game number, time of the game, name home team, game score home team, name visitor team and visitor score score.

Starting the schedule is easy, you just slot in the team names for home and visitors, but after playing the first game, the winner advances, which will create the data for a later record and the loser disappears.

So for simplicity lets say there are four teams are in the tourney. (I know for a four team tourney just get a piece of paper and do it the old fashion way).  And a champion of the tournament is crowned after the third game.

So I am trying to build a database in simple terms that takes the winner of game (record) 1 and adds them to game (record) 3.  Does the same to game (record) 2, the winning team is again added to game (record) 3.

So essentially I am trying to build a schedule table that auto populates later records, based on the results of earlier records.

Really simple to do in Excel ...  can't make it work in Quickbase
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
This is a neat logic puzzle.  I suggest that you post this as a new Question.  I get what you mean.  I imagine that you have a 64 team tournament and on the wall are all the games, but initially no names are filled in as to the teams except the left hand side which has the 64 teams for the initial 32 games all ready to go.  As each game is decided, you want to fill in the boxes of the next level games until you get to the quarter semi and then finals.  

I suspect that there is a very elegant way to do this and if i could get it working as a puzzle project i would post the app to the Exchange.
Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb
Yes, exactly.  I know there are programs that do this exact stuff (ie tournament software, ladder software), but really wanted to to see if you had encountered similar in your exploits and new a simply methodology.  Thanks, and I will post.