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

Help on something I am sure is easy but I am Stupid!

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

    Help on something I am sure is easy but I am Stupid!

    I am trying to find a way when I do a key search such as a serial number that it will let me know when there isn't a match instead of landing to the closet next number? I use the find by serial number I created for my form but it doens't flag it when it isn't correct.. I am sure I missed a step...
    Thanks in advanced!


    'Display custom Find_by_Key dialog in current form.
    topparent.FindBy_DefinedKey("Find Serial Number","Search for:",2,"Serialnum",.t.,"$a5_find_by_key")

    #2
    Re: Help on something I am sure is easy but I am Stupid!

    Hi Keller
    I am not sure I understand what you are doing but if you are using xbasic then you have to examine the record retrieved to see if the key field has the right data.
    If there is more then one record with the key value, then since they will be in the index order, you can fetch through the table until the key field changes.
    For example:

    tbw = table.open("[PathAlias.ADB_Path]\apptweekly")
    indxw = tbw.index_primary_put("loginid")
    recw = tbw.fetch_find(aloginid)
    if recw > 0
    while (.NOT.tbw.fetch_eof().and.(tbw.loginid=aloginid))
    'do stuff
    tbw.fetch_next()
    end if
    tbw.close()

    If there is only one record with the key data then check the key field before you process it.
    If you are doing something else then I am sorry I missed it but maybe you can still check the data.
    Hope this helps. And using Alpha proves you are not stupid.
    Irwin

    Comment


      #3
      Re: Help on something I am sure is easy but I am Stupid!

      Of course I left out the end while

      tbw = table.open("[PathAlias.ADB_Path]\apptweekly")
      indxw = tbw.index_primary_put("loginid")
      recw = tbw.fetch_find(aloginid)
      if recw > 0
      while (.NOT.tbw.fetch_eof().and.(tbw.loginid=aloginid))
      'do stuff
      tbw.fetch_next()
      end while
      end if
      tbw.close()

      Irwin

      Comment


        #4
        Re: Help on something I am sure is easy but I am Stupid!

        Thanks for the response as I am in a jam but limping along trying to do this somewhat manual... The database has 1000 plus records with unique serial numbers... I am looking up serial numbers of each radios that should have already been entered but I am finding that the key search on that field is finding not only the correct serial number entered but those that are not by finding the closest record therefore making it slower to inspect each serial number to see if it is in fact the correct serial number instead of just not finding the record so I know it isn't in the database... I hope that make since... I'll try your code but I am a novist and it will take me some figuring out how to use it...
        Thanks in advance for the help...

        Comment


          #5
          Re: Help on something I am sure is easy but I am Stupid!

          Input the search values into a new table and then do a subtract (join operation) from your existing table.
          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


            #6
            Re: Help on something I am sure is easy but I am Stupid!

            One last question about the table? When we add records how do I keep the table updated so I don't have to do double entries to keep it up to date?
            Thanks

            Comment


              #7
              Re: Help on something I am sure is easy but I am Stupid!

              I don't understand your question.

              The records that you enter into the new table don't go away.

              Work through the process, build the join, and it'll make more sense to you.
              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


                #8
                Re: Help on something I am sure is easy but I am Stupid!

                I guess I was wanting to know after running the new table with what serial numbers I already have in the database what happens when I enter new serial numbers to the current database and then later when I do a key search will it be the same thing where the nearest serial not the exact will be selected because the newly enterd serial numbers never made it into the table... I'll try what you say I am just trying to avoid a problem for future serial numbers that I know will be added and then need to be found by exact number and not the closet possibility...

                It would seem that if the key doesn't match there would be a easy way to eliminate a close match... As it is now tonight we entered the serial numbers for a match thinking that it would only select the exact match and not a close match to find we had several that were never entered therefore now causing us to look at the actual barcoded small number to see if we got the exact match and not a close match...
                Thanks again for your help... This will be fantastic if and when I can get it figured out!!!

                Comment


                  #9
                  Re: Help on something I am sure is easy but I am Stupid!

                  I am unfortunately very confused after running the join and subtract process. I have 2 new keys one with all the serial numbers from the master and the 2nd one with both serial numbers of both the master and the second one... All this to say I guess it's apparent I absolutely don't understand where of how to go any further to do what I had hoped would be a simple process... Don't blame you if you want to give up because I don't know how to explain all I want to do is look up an exact matching serial number that may or may not exsist in the database and if it doesn't to either say not found, do nothing but at least not give me a close match... Surely I am not the only one who has ever wanted this...
                  Thanks again...

                  Sorry I am not certainly mad at you just frustrated that after hours of trying I still don't get it...
                  You have been kind enough to at least try to help...

                  Comment


                    #10
                    Re: Help on something I am sure is easy but I am Stupid!

                    Unzip and add this table to your AlphaSports sample database. Open the form and check product numbers.
                    There can be only one.

                    Comment


                      #11
                      Re: Help on something I am sure is easy but I am Stupid!

                      Stan and Especially Alan Buchholz!!! THANK YOU BOTH for your help! I got exactly what I needed and then some thanks to Alan for the added assistance... My finding the exact record has been solved!!!
                      Oh and one more thing, this is for you Alan... GO COWBOYS!!!!
                      Sincerely,
                      Keller...

                      Comment


                        #12
                        Re: Help on something I am sure is easy but I am Stupid!

                        Originally posted by kellerm View Post
                        GO COWBOYS!!!!
                        Man, that'll leave a mark.. Maybe I should call Tony and see if he wants to come over and watch the game Sat night... :p - ah nothing but fun...

                        Stan, we connected and used your idea. Changed the variable to global and made the variable the default for the table (in field rules), so after a check of a serial number is made and not found, the enter picks up the search value as the value for the serial number.

                        Should work OK....
                        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


                          #13
                          Re: Help on something I am sure is easy but I am Stupid!

                          Would either of you care to post a small sample of how you used it in practice? I was really just illustrating that it was easy enough to find out if a given value existed in the table which seemed to be the first hurdle.

                          I don't do that sort of thing so it would help me understand the whole process if a similar question arises again.
                          There can be only one.

                          Comment


                            #14
                            Re: Help on something I am sure is easy but I am Stupid!

                            Stan

                            I got a call from the Packers and my season tickets have been revoked..... So I might as well post the example..

                            same table - atest

                            also an autoexec script

                            I made it it's own database named atestdb
                            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


                              #15
                              Re: Help on something I am sure is easy but I am Stupid!

                              Nice, thanks.
                              There can be only one.

                              Comment

                              Working...
                              X