Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Design Concept

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

    Design Concept

    I have a form on my website in which customers submit their id number, then 3 choices for classes they want to attend. I want to pick the class that has the lowest registration. I know I can fully automate this, but to start, I want to create a quasi automated system.

    How would I append another database with the information from field 1 (their id number) and then the contents from field 2, 3, 4 or 5, which I would pick.

    I'm doing this in V8, desktop version.

    Thank you.

    --Rob

    Here's a link to the web-form - PLEASE don't add any data!

    http://www.swimamerica.info:81/register.a5w
    Last edited by RobPolley; 04-08-2008, 12:13 PM. Reason: Left out something.

    #2
    Re: Design Concept

    You don't give enough information for a more complete answer.

    I am guessing that you know how to collect data from the website to a table, and you want to then append data from that table to another one - presumably one that holds your final registration data.

    The simplest way that comes to mind is to have a function that filters your registration table on the 4 choices, and then have a loop kinda' like this
    Code:
    tbl.fetch_first()
    while .not. tbl.fetch_eof()
    ... some code here....
    tbl.fetch_next()    
    end while
    that uses 4 variables to count how many registrations you have for each of the 4 choices.

    Or you can do a summary operation to do the same thing.

    Although, from a customer care POV, I think your approach is not the best. I'd rather consider user's choice#1, then #2, etc, and limit their choices when the more popular classes have been filled.
    It is easier to get older than wiser

    Comment


      #3
      Re: Design Concept

      I appreciate your thoughts. Your assumption is correct, as is your customer service advice. I go through these one at a time, in order received, and balance the classes as I go. I guess my question is, how do I create a button that will take the id number, and the class # choice that for which I want them to be registered, and append them to my "final registration" table.

      Do I need to learn variables to do this?

      Many thanks!

      Comment


        #4
        Re: Design Concept

        I don't think you can do this without the use of some xbasic code - action scripting is great but it can only take you so far.

        Learning variables is the easy part - a variable is just an object which can store a temporary value that is likely to change during the execution of a program. In your case, if you are using a form to fire the filter/append operation, you can define your variables with the form in design, click Form -> variables ->global -> give them some name you can remember easily and define them as number (give them the value of 0) like so: varChoice1Count = 0

        The next part is a bit more complicated, you will need xbasic to do the filter and loop, I normally use inline xbasic for stuff like that, but better programmers use saved functions instead.

        I'll need a new post for that part.
        Last edited by mariusm; 04-08-2008, 03:13 PM.
        It is easier to get older than wiser

        Comment


          #5
          Re: Design Concept

          So the next would be something like:
          Code:
          DIM vChoice1 as n   'this declares local variable vChoice1
          DIM vChoice2 as n
          DIM vChoice3 as n
          DIM vChoice4 as n
          vChoice1 = parentform:Choice1.value ' replace Choice1 with the name of your Choice 1 field
          vChoice2 = parentform:Choice2.value
          ' ... and the same for choice3 and 4 ....
          
          tbl = table.open("theNameOfYourRegistrationTable")
          
          query.filter = "(sessionNumber=var->vChoice1).or.(sessionNumber=var->vChoice2).or.(sessionNumber=var->vChoice3).or.(sessionNumber=var->vChoice4)
          query.order = ""
          qry = tbl.query_create()
          
          varChoice1Count = 0
          varChoice2Count = 0
          varChoice3Count = 0
          varChoice4Count = 0
          
          tbl.fetch_first()    
          while .not. tbl.fetch_eof()
          IF tbl.sessionNumber=vChoice1 'replace name of field with the actual name in your table
          	varChoice1Count = varChoice1Count+1
          ELSE IF tbl.sessionNumber=vChoice2
          	varChoice2Count = varChoice2Count+1
          ELSE IF tbl.sessionNumber=vChoice3
          	varChoice3Count = varChoice3Count+1
          ELSE
                  varChoice4Count = varChoice4Count+1
          END IF
          tbl.fetch_next()    
          end while
          
          tbl.close()
          So now you can use the varChoice(n)Count variables to see which is the most popular class, and then you can use that choice for your append operation.
          You can make an append operation with action scripting.

          If you want the same button to do all these opperation, you'll need to convert everything to xbasic after each separate step works. Otherwise you'll run into timing issues with one operation trying to start while another hasn't finished.

          Of course, I'm not the best xBasic programmer, so I'm sure others can give you a much simpler or better answer. :)
          Last edited by mariusm; 04-08-2008, 03:37 PM.
          It is easier to get older than wiser

          Comment


            #6
            Re: Design Concept

            Marius,

            I appreciate your help with this. May I ask a few more questions? My plan is much simpler than what you had shown, I think. If you imagine on the form fields for choice 1, choice 2, choice 3, and choice 4, witha "register" button above each, my thought is that clicking the register button above any 1 of the choice fields would append both the participant id number (which is in another field on the form) and the corresponding session number to my master "registration table." Given that, I think I still need the variables for each session. I guess I can write the x basic to append both values (participant id and session #) to the main reg table, right?

            Just to clarify, I decide, by looking at a summary grid, which session I want to register them for. I know I can probably automate this further, but even the step I've described above is much better than the totally manual system I have in place, in which they use US Mail to send this info to me, and I process them one at a time, retyping the info from paper to my computer.

            Thank you.

            --Rob
            Last edited by RobPolley; 04-08-2008, 07:05 PM. Reason: mistake

            Comment

            Working...
            X