Announcement

Collapse
No announcement yet.

Creating a Raffle - Random Number Generated

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating a Raffle - Random Number Generated

    Hello all you clever peeps, I have been given the task of 'Managing' an annual raffle event for apx 200-300 club members. I have generated associated members lists and issued number blocks per members, these blocks vary from 10 to 60+ numbers per member.

    The members list and issued numbers are in an Excel file, this file allows for adding additional random numbers as and when the member purchases any additional 'Tickets'.

    What I need to do now is to create an application that will provide for a 'Random Number Generator' to be displayed whilst finding the member associated with that number, obviously storing that number with the members details.

    I would like to engage with someone who is willing to 'hold my hand' on this and increase my understanding. I am a dinosaur programmer/systems & business analyst so have some ancient knowledge of what can and can not be done.

    Many thanks in advanced to anyone who wants to have a go reviving an old git

    Phil M

  • #2
    Sadly you jumped on place I walk away from I hate maths lol
    Plugins or Sources MokoX
    BunnyHop 2021 Here

    Comment


    • #3
      Thanks kingzooly, I sorted it. I now have a display that rotates through my random numbers for a few seconds before it displays the selected random number. All I have left to do is compare that number with my members list of bought tickets and stop that number being selected again.

      Thanks anyway

      Phil M

      Comment


      • #4
        Just popped in to the forum for a quick look-see.

        I did something similar a long time ago. I don't know how you are initialising your app but what I did was first populate a table and then each time a number was selected I ran a global function to 1) Display the number 2) Delete the table item 3) Get the number of items now in the table ready to pick the next random table item. I also used the same method to build a lotto game to ensure that each number could onl;y get picked once.

        Comment


        • #5
          Further to my reply to your PM Phil - A 10 minute app with no error checking! As I said it's a long time ago now but anyway it might just help you Raffle.apz
          Attached Files

          Comment


          • #6
            longedge, thanks

            I know what you mean about the grey cells, at 67 I'm feeling the same LOL. I'll check your numbers out.

            I have a bucket-full of numbers to play with, at the moment my App selects a Random number between 2 ranges and displays on screen, the intention is then to see if that number has been 'Sold' and to Whom. At this exact moment in time I'm trying it to 'Flick' through the numbers giving the rattle of a bingo ball, the numbers flashing up in a random sequence to add some anticipation effect.

            As an aside, this is for an RAF Christmas Draw event and there's a lot of prizes and Mess Members, plenty of number crunching

            Phil M

            Comment


            • #7
              George

              I think I could use this however, I tried to change the number of tickets to 100 but

              Comment


              • #8
                It's only a starting point Phil this one for instance you can set how many tickets you choose from and the numbers are incremented by the loop count+500. (I think I've caught the bug again ) Raffle2.apz
                Last edited by longedge; 10-24-2017, 02:42 PM.

                Comment


                • #9
                  Hee Hee, I've now got my random generator with a 'random' display simulating 'rolling' numbers with associated member names 'Flashing' below the numbers

                  Comment


                  • #10
                    George

                    Hi, are you online?

                    I'm sure it's easy but for the life of me I can't see it!!

                    I have some Excel Tables, I want to get information from them 'Member, Name No of tickets etc' and write back to them

                    I am now against the wall to finish this, any help in the right direction will help

                    Thanks

                    Phil M

                    Comment


                    • #11
                      Off the top of my head I'd look at exporting my Excel table to a text file and then using the "TextFile.ReadToTable" action. It'll read each line to a new table item. If the lines contain more than one data item you should be able to parse them to extract the separate data elements. I've never done it as far as I can remember but that's what I'd try
                      Last edited by longedge; 10-31-2017, 02:55 PM.

                      Comment


                      • #12
                        p.s. Just tried it. I created an Excel file and saved it out as "Text (MS-DOS)". The 1 minute apz is below.
                        Data from Excel.apz

                        Comment


                        • #13
                          George, Brill

                          Again, Many Thanks for your assistance

                          Phil M

                          Comment


                          • #14
                            George

                            Been Playing with the Excel apz, I have taken most of it on-board and there's much that fits the Requirements Doc, however, I'm struggling with some of the variables as you suspected.

                            \r\n etc, [k] ..k.. ?

                            I have however learn't or rather remembered a lot of it

                            Many thanks

                            Phil M

                            Comment


                            • #15
                              "\r\n" - inserts a line feed into the string that is then displayed in the paragraph object.
                              "[k]..k" - the k is the current value in the for loop whilst getting the table values. So "tnames[k]" gets what is at index k in the table. "..k" concatenates the string with the current count value in the loop .

                              Comment

                              Working...
                              X