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

Multi Column Dynamic Lookup

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

    Multi Column Dynamic Lookup

    Here is a revised edition for V8 - it uses a modified version of Alpha Sports
    to use it - open it, goto Customers, and use the DemoLookup button

    the FTP is only good for 14 days, so if you see this after 4/27/2007+14 email me at [email protected] and I'll email it to you.

    it uses form CustomerLookup - note there is a shared form vaiable called bcol (browse current column) and that at the browses onarrive event, it sets the variable to the browses current column - and when changing columns it resets the variable.

    all the action is in the form's onkey event. If you type "W" and then "I" in the Customer column, and then use for example the tab or right arrow key to change columns, it resets the query.

    the salient feature is that it searches within the current field, not from left to right. It is especially helpful when looking up in fields where the values are cryptic - like in a partnumber field where the value was "R7-A24769b-Lugs-Boeing" and you had 5 parts that contained "Lugs" and 7 that contained "Boeing" - you could quickly find by searching for "lugs", scrolling, and Enter of DoubleClick. It works as is quite well where there are up to about 12 to 14 thousand records. For larger files, I set it to start looking on the 2nd or 3rd character entered.

    http://www.yousendit.com/download/WUJiTkFuTmFxRTAwTVE9PQ
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    [email protected]

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

    #2
    Re: Multi Column Dynamic Lookup

    Thanks for posting this, I just tried it out and it just brings the search to new levels. This should really be embedded in the AlphaSports application as it makes the searching process a joy. As long as you know some portion of the field value you can find it and don't have to use wildcards in the search.

    Ken

    Comment


      #3
      Re: Multi Column Dynamic Lookup

      Martin,

      Does this edition also work for prior versions of Alpha and if so which as far as you know??
      Mike
      __________________________________________
      It is only when we forget all our learning that we begin to know.
      It's not what you look at that matters, it's what you see.
      Henry David Thoreau
      __________________________________________



      Comment


        #4
        Re: Multi Column Dynamic Lookup

        it should work in any version from 5-4.0 thru 8
        I've been usig it for several years - the orginal idea was from Dr. Peter Wayne - I just modified and enhanced for my own use. All my users like it, especially vecause I have a lot of cryptic fields in a lot of apps

        be sure that the column title matches

        say you change the column title to "Billing Addess"
        elseif browse1.active()="bill_address_1"
        query.filter="var->tempstr $ bill_address_1"

        browse1.active() is now "Billing Address"
        but the filter remains, as it address a field name, not a column title
        Cole Custom Programming - Terrell, Texas
        972 524 8714
        [email protected]

        ____________________
        "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

        Comment


          #5
          Re: Multi Column Dynamic Lookup

          I just saw your post regarding the multi column dynamic lookup. I was wondering if you could send me a copy of the sample you posted. It sounds like the answer I have been looking for! I need to be able to lookup differing amounts OF various items in rows by columns depending on column header typed into textbox.

          ex:

          A B C
          CAT 11 22 33
          DOG 44 55 66
          MOUSE 77 88 99


          If items in 2 search boxes are "DOG" AND "B" RESPECTIVELY, THIRD TEXT BOX DELIVERS RESULT OF "55"

          Do you think your method would work for that? ANY suggestions would be greatly appreciated; I am pulling my hair out!

          Thanks
          Marie

          Comment


            #6
            Re: Multi Column Dynamic Lookup

            Marie

            I think you should look at the conditional table lookup. It's the next choice after table lookup.....

            ps - don't pull your hair out. Most of us have already done that.. ;)
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              Re: Multi Column Dynamic Lookup

              Thanks! I will give it a shot!

              Comment


                #8
                Re: Multi Column Dynamic Lookup

                Having problems still. I guess it wasn't what I need. My problem requires a more detailed lookup.
                I am still trying to find help with a look up function.

                I want my staff to be able to input a variable into 2 input boxes (such as "Animal" and "Internal code"),

                with a third box producing the result of a cross reference lookup. The column searched is dependant on the Animal and Internal code submitted.

                Example: database columns = A,B,C and rows = CAT, DOG AND MOUSE (real database contains thousands of records so drop down boxes are not an option). Excel made this easy by allowing rows and columns to have range names making it easy to find the intersection. Not sure how to accomplish this in Alpha.

                ------------A-- B---C
                CAT-------11--22--33
                DOG-------44--55--66
                MOUSE----77--88--99

                Data input:
                Animal: Dog Internal code: B

                Data output =55
                Items in 2 search boxes are "DOG" AND "B" RESPECTIVELY, THIRD TEXT BOX DELIVERS RESULT OF "55". Column "B" and Row "Dog" interersect in cell with content of "55"

                Anyone else have any ideas?

                Thanks
                Marie

                Comment


                  #9
                  Re: Multi Column Dynamic Lookup

                  Marie,
                  Do you already have this spreadsheet. If so, it could be converted into a three field table with 3 fields animal, 'column', code. How many animal? How many columns (A,B,C,etc) ? I will help you.
                  Mike W
                  __________________________
                  "I rebel in at least small things to express to the world that I have not completely surrendered"

                  Comment


                    #10
                    Re: Multi Column Dynamic Lookup

                    Marie,
                    Here is an example.

                    I created a spreadsheet with columns as Animals and A-H, and made code numbers in the cells as you described. I saved this as a .dbf IV file = xls_codes. I then added this table to the database. It has the 9 fields of Animals, and A-H (columns). I created another table named = Codes with three fields = Animal, Column, and A_code. I then wrote a script (transform) to convert the data in the xls_code table to fit into the fields and structure of the Codes table. The codes table can now be your lookup table based upon the two field values of animal and column. The form F_dataentry has an OnDepart script on the Column field with the lookup to the Codes table based upon the values in the Animal and Column fields and fills in the code into the A_code field.

                    I think this is what you were looking for. Hope this helps, and good luck.
                    Mike W
                    __________________________
                    "I rebel in at least small things to express to the world that I have not completely surrendered"

                    Comment


                      #11
                      Re: Multi Column Dynamic Lookup

                      You should be able to do this with a lookup() expression and return it to a calculated field for the form (third text box).

                      Suppose

                      the leftmost field in the lookup table where you have cat, mouse, dog has the field name "animal"
                      the object name of the first text box is "which"
                      the object name of the second text box is "where"

                      lookup("yourtablename","animal = "+quote(which.value),where.value)
                      There can be only one.

                      Comment


                        #12
                        Re: Multi Column Dynamic Lookup

                        Thanks so much everyone for the help. I will try the suggestions this weekend. Oh, and my spreadsheet has 11076 rows and 410 columns. Data maintenance is a nightmare so being able to look up info is a must!

                        Thanks again!
                        Marie

                        Comment


                          #13
                          Re: Multi Column Dynamic Lookup

                          Originally posted by Stan Mathews View Post
                          You should be able to do this with a lookup() expression and return it to a calculated field for the form (third text box).

                          Suppose

                          the leftmost field in the lookup table where you have cat, mouse, dog has the field name "animal"
                          the object name of the first text box is "which"
                          the object name of the second text box is "where"

                          lookup("yourtablename","animal = "+quote(which.value),where.value)
                          Heck, Stan..what's the fun in doing it the easy and direct way. 11076 * 410 would be 4,541,160 records. Whoa... never mind.

                          Code:
                          dim vpet as C = "Ant"
                          dim vcol as C = "D"
                          ? lookup("xls_codes","animal = "+quote(vpet),vcol) 
                          = 4007
                          ps: sorry to misbehave by further hijacking m.c's thread.
                          Mike W
                          __________________________
                          "I rebel in at least small things to express to the world that I have not completely surrendered"

                          Comment


                            #14
                            Re: Multi Column Dynamic Lookup

                            Originally posted by Mike Wilson View Post
                            Heck, Stan..what's the fun in doing it the easy and direct way. 11076 * 410 would be 4,541,160 records. Whoa... never mind.

                            Code:
                            dim vpet as C = "Ant"
                            dim vcol as C = "D"
                            ? lookup("xls_codes","animal = "+quote(vpet),vcol) 
                            = 4007
                            ps: sorry to misbehave by further hijacking m.c's thread.
                            Mike,

                            I'm just stumbling around in the dark and learning by experimenting. I had no idea that one could construct a double variable driven lookup. I suppose it could actually be a triple variable driven lookup if one was offered the choice of tables on which to perform the lookup.


                            My original thought was to use the "column" horizontal position translated into a field number which would get you to the field name but soon realized that was unnecessary. This sort of thread is just so much darn fun.
                            There can be only one.

                            Comment


                              #15
                              Re: Multi Column Dynamic Lookup

                              Thanks Everyone! That makes much more sense and I think we have a winner! I think it will work like a charm!

                              Marie

                              Comment

                              Working...
                              X