11 Replies Latest reply on Feb 3, 2010 9:24 AM by philmodjunk

    Need to have sequential numbers added to selected entries in database

    ww

      Title

      Need to have sequential numbers added to selected entries in database

      Post

      We will be selling 42 numbered tickets to an event, and I need to create a master list to check off the attendees as they arrive. On the master list I want the attendees to be listed sequentially by ticket number. I am not having any luck finding a way to do this.

        • 1. Re: Need to have sequential numbers added to selected entries in database
          raybaudi
             Are those numbered tickets really saved into number fields ?
          Are they really numbers ?
          • 2. Re: Need to have sequential numbers added to selected entries in database
            ninja
              

            Howdy ww,

             

            Assuming you have both ticket# and name fields, simply sort records by ticket number and use list view in your layout.  Then print.

             

            I figure you would have thought of this already...perhaps you could explain where you are getting hung up?

             

            Your title suggests you haven't put in a number field yet.  For 42 records...add the field to the layout, find the person, and type in the correct number.

            • 3. Re: Need to have sequential numbers added to selected entries in database
              ww
                

              Hi Raybaudi & Ninja

               

              Right now I have nothing that is working, I tried a field that is a number but cannot figure out how to have it automatically create the sequence as it would be a pill to figure out what the next number in the sequence should be of a sold ticket as the database is 500+ strong and I want to just find the name and enter the purchase price (which could be one or more) and have it assigned the ticket number upon commit. 

               

              Hope this helps explain as I am way less than a novice. 

              • 4. Re: Need to have sequential numbers added to selected entries in database
                ww
                  

                Hi Raybaudi,

                 

                Right now I have nothing that is working, I tried a field that is a number but cannot figure out how to have it automatically create the sequence as it would be a pill to figure out what the next number in the sequence should be of a sold ticket as the database is 500 plus strong and I want to just find the name and enter the purchase price (which could be one or more) and have it assigned the ticket number upon commit. 

                 

                Hope this helps explain as I am way less than a novice. 

                • 5. Re: Need to have sequential numbers added to selected entries in database
                  ww
                    

                  Hi Ninja

                   

                  Right now I have nothing that is working, I tried a field that is a number but cannot figure out how to have it automatically create the sequence as it would be a pill to figure out what the next number in the sequence should be of a sold ticket as the database is 500 plus strong and I want to just find the name and enter the purchase price (which could be one or more) and have it assigned the ticket number upon commit. 

                   

                  Hope this helps explain as I am way less than a novice. 

                  • 6. Re: Need to have sequential numbers added to selected entries in database
                    philmodjunk
                      

                    If you were doing this just with paper and pencil, how would you know which number to give the next ticket? Does the number represent the order in which the tickets were sold or something else?

                    • 7. Re: Need to have sequential numbers added to selected entries in database
                      ww
                         Sequential 1, 2, 3, 4, 5, etc. in the order they are sold.
                      • 8. Re: Need to have sequential numbers added to selected entries in database
                        philmodjunk
                          

                        Since you have over 500 records but are only selling 42 tickets, you have a different series of numbers for each event correct?

                         

                        Are these ticket sales being recorded on a single computer or more than one computer linked to the same database?

                         

                        There are several approaches being taken, but if you have sales being recorded simultaneously on different computers, care must be taken to insure that ticket sales on different computers don't get the same next serial number if the sale is recorded at almost the same time.

                        • 9. Re: Need to have sequential numbers added to selected entries in database
                          ww
                            

                          PhilModJunk, 

                           

                          This is the first event we have sponsored. And I suppose that in the future there would be other fundraising events as well so there would be a need for each event to have its own series of numbers.

                           

                          The ticket sales are just on my computer. 

                          • 10. Re: Need to have sequential numbers added to selected entries in database
                            RickWhitelaw
                               I'm being picky but you don't have to reply to each contributor individually. Raybaudi and Ninja will both see your post.
                            • 11. Re: Need to have sequential numbers added to selected entries in database
                              philmodjunk
                                

                              If this were only one event and only one series of ticket numbers, you can use the auto-entered serial number option to auto-enter a serial number each time you create a new record to log the sale. If you will be selling tickets for multiple events (either at the same time or different times) and want the series to start over with each new event, you can set up a relationship and an auto-entered calculation that computes the next ticket number in the series and auto-enters it.

                               

                              Let's call the table where you log the sale of each ticket "TicketSales". Give it two fields: Event and Ticket Number.

                               

                              Define a "self join" relationship in your relationship graph.

                              Open Manage | Database | Relationships and drag from TicketSales::Event to outside the box border and then back to this same field. A dialog box pops up asking you to name this new "instance" of a table (Called a table occurrence everywhere else but here.). Name this new table occurrence "TicketSalesbyEvent".

                              You can give your Event field a value list of events for which you are selling tickets.

                              Then give the Ticket Number field an auto-entered calculation:

                               

                              If ( not IsEmpty (Event) ; Max ( TicketSalesByEvent::Ticket Number ) + 1 ; "" )

                              Clear the "do not evaluate if all referenced fields are empty" check box.

                              Clear the "Do not replace existing value" check box.

                               

                              Now you should be set for as long as you sell tickets from a single computer.

                               

                              Why this is not a good approach in a multi-user environment:

                              With two or more clients logging ticket sales, two users could log the sale of a ticket at nearly the same time. In that situation Max ( TicketSalesByEvent::Ticket Number ) may return the same value to each client and then both clients will log the same ticket number.