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

Auto-updating drop down list?

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

    Auto-updating drop down list?

    I am wondering if it is possible to use Xbasic to cause a drop down list in a form to show only items currently listed in a table.

    I do scheduling for a packaged-bean manufacturing plant. I have a schedule database set up storing quantities of desired items and their ship dates. Sometimes I am asked "How much yellow popcorn do you have scheduled?" or other variety.

    On a form, I'd like a "Quick Info" tab that has:
    a)......a drop down list that automatically shows only the varieties currently listed in my database

    so that I can have:
    b)......an embedded browse that would then be automatically filtered by the drop down list's selected variety

    so that I can have:
    c)......a calculated total quantity of the orders calling for the particular variety


    I have a "Quick Info" tab on my form. On it, I have a drop-down list based on the variety field. Unfortunately, it only shows the variety of the currently selected record. The drop-down list is empty. I know I can manually enter the multitude of varieties I work with (Field Properties, Choices tab), but I would rather the list autoupdate based upon what's currently in my schedule.

    (I also know that I can scroll through my embedded browse to my desired variety, click the quick filter button, and then highlight all remaining records to get a total quantity, but I'd rather be able to just select the bean and have Alpha 5 do the rest.)

    I've been searching through all of my manuals for Xbasic scripts and/or code that would allow this, but my inexperience with programming is a stumbling block for me. Can anyone give me a general idea of what direction and steps to take?

    I've included a small, simplified table called "Apples & Oranges, Etc" as a starting spot. I've been chewing on this for weeks now, so I'd really appreciate any assistance! :-)

    #2
    RE: Auto-updating drop down list?

    Mat;

    I did not download your example but there is some information
    http://www.learn alpha.com/filtered/filtered.htm
    for you

    Good Luck

    Comment


      #3
      RE: Auto-updating drop down list?

      Matthew:

      You write:

      On a form, I'd like a "Quick Info" tab that has:
      a)......a drop down list that automatically shows only the varieties currently listed in my database

      so that I can have:
      b)......an embedded browse that would then be automatically filtered by the drop down list's selected variety

      so that I can have:
      c)......a calculated total quantity of the orders calling for the particular variety.
      ----------------

      If I read you right you can get what you want by defining a variable, setting its value on the form and using the value to filter the form.

      So if your table of varieties had fields for variety_no and variety_desc you could create a lookup based on the variety table, have the user choose the description and code the form to filter on the number.

      But...
      Ver4 has a limitation. While you can easly define a lookup based on a table in field rules, you can't define a table lookup for a variable. Version 5 allows table-based lookups for form controls bound to variables so in 5 you would be all set.

      In 4 you have to work harder or compromise:
      -define a field as a sort of holding area in the table on which form is based so you can define a table lookup in field rules; or,
      -place a list box on the form which you populate from the values in your varieties table. The user selects a row and you use the information to filter the form; or,
      -put a button on the form to call up another form in dialog mode on which you place a listbox populated from the table. The advantage or this method is that users see the listbox only when they need it; or,
      -use UI_get_list_array to elicit a choice from the user.

      The documentation contains code for all of these approaches.

      There are others.

      This should get you thinking a bit. Write back with any questions you may have.

      Bill
      Bill Hanigsberg

      Comment


        #4
        RE: Auto-updating drop down list?

        Matt:
        see attached ZIP file.
        download to a new directory so it won't override your data.
        I modified you tab 2 with some buttons.
        select -summarizes the schedule table and pops up an aaray so the user can select a variety.
        on selection a query is run and the browse refreshes.
        also there is a total ordered count based on the query.
        show all-blanks the query and shows all entries in the schedule table

        good luck

        Charlie Crimmel

        Comment


          #5
          RE: Auto-updating drop down list?

          I am using Alpha Five version 4.5 build 266

          Is this the one that "allows table-based lookups for form controls bound to variables"?

          Comment


            #6
            RE: Auto-updating drop down list?

            This might not help, but may give some ideas. I use what I call "smart" drop down form field that I populate using X-basic. Usually this is done when the form loads, but depending on the size of the drop down list, could be done at other times. We find it works very well here. If you need example code, I would be happy to provide.

            Tom Lyon

            Comment


              #7
              RE: Auto-updating drop down list?

              Charlie,

              Thanks for the buttons on the form. They work great, and with a slight modification I was able to have the result table automatically sort based on ship dates. If I am unable to find a drop down list method, then I will use your button method. Great job!


              Tom,

              I am curious about your "smart" drop down form field. If you could supply a sample of the code (with any tips or clarifications suitable for a newbie like me), I would love to play with it! :-)

              Comment

              Working...
              X