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

Form for searching existing records

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

    Form for searching existing records

    Hi All,

    I'm trying to design a form where the user scans the serial number of a product which already exists in the table. These products have an "en route" status and the date_in field is blank. I have an embedded browse that shows the user the "en route" products.

    As the product arrives and the SN is scanned, I'd like the form to go to that record in the embedded browse so the user can update a few fields.
    Entry.JPG

    1st: What is the best method to execute this type of search? I'm currently using a modified "find text" action script and pointing it to the browse. Although this works, its not great - any type of match will result in a "find". I want it go an exact SN match only. I'm looking for the best "search" method to use in this case.

    2nd: Is there a better form design that can be implemented to do what I am describing? I have limited experience, many of you may be able to offer a much better solution that what I was able to come up with. See my form attached.

    Please let me know if you need more background/information.

    Thanks!

    #2
    Re: Form for searching existing records

    I want it go an exact SN match only
    If you want an exact match you need an index on the SN and use find by key.
    There can be only one.

    Comment


      #3
      Re: Form for searching existing records

      I thought so Stan, I was looking into this. The issue with indexing on SN is that my browse will not display in the order I would like. Currently it sorts by PO Number and then by Line#. Ordering by SN is basically useless to the user... any way around this?

      Comment


        #4
        Re: Form for searching existing records

        Don't know nearly enough to comment. Have no idea what the browse represents, table or set structure, why your browse won't display in the order you want, etc.
        There can be only one.

        Comment


          #5
          Re: Form for searching existing records

          Sorry let me re-phrase, My form properties are set to order by po# then line#, I'm happy with this. But when you suggested I should index on SN for the search, the only way for 'find by key' to work would be if my form was using also using that index right?

          Comment


            #6
            Re: Form for searching existing records

            your form does not need that index.
            The table however does.
            I might suggest scan into a lookup variable field based on the SN but return the line number
            Then fetch_goto that line number on the browse.

            Then you wont have to step around the numeric issue of the po/line number indices., unless you index line number on a string of the number. but thats redundant.

            the next issue I totally avoid is use of line number as part of a formal index, it changes after packing. If you are using dbf;s your lines will be in number sequence after po, by default.

            Comment


              #7
              Re: Form for searching existing records

              Thanks Ray. Don't worry about the "line number" field, this is a manually entered numeric field which hasn't changed after packing the table. As far as the SN, I am currently scanning into a variable. I will look into how to return the line number and fetch_goto.

              Comment


                #8
                Re: Form for searching existing records

                Ray after a number of attempts I'm still falling short. When you say my form doesn't need an index, then how will the fetch_goto know which index to search in?

                Comment


                  #9
                  Re: Form for searching existing records

                  Have your lookup return the actual recno() (not your one)
                  fetch_goto(recno) - no index required

                  or

                  have it return your index combination (po+yourline-number) into your variable

                  and OnChange
                  tbl =table.open("your table",FILE_RO_SHARED)
                  tbl.index_primary_put("your index")
                  fnd=tbl.fetch_find(your variable.value)

                  Or post your failing example.

                  Comment


                    #10
                    Re: Form for searching existing records

                    Great, thanks Ray. I created an action script to go_to record#, and i defined the rec# by expression as a lookup to my serial number and returning the record number.

                    I wanted to ask: On form initialize, I set just about every object to disable (essentially locking the form). After the correct (matching) record is fetched, these fields are enabled and the user begins entering data. The only issue is that I would like to re-disable/ lock the form again if the user cancels changes.

                    How could I go about doing this? There is on OnCancel event for the form, what should I look for?

                    Comment


                      #11
                      Re: Form for searching existing records

                      I would like to re-disable/ lock the form again if the user cancels changes.
                      Cancels and moves to another record? Use the onfetch to do that.
                      There can be only one.

                      Comment


                        #12
                        Re: Form for searching existing records

                        No it cancels editing and returns cursor to the "Scan Serial Number" field, 1st field on the form. It is the equivalent of hitting the ESC key when editing a record.

                        Comment


                          #13
                          Re: Form for searching existing records

                          I think AskSaveChange is close to what I need. "When the user abandons an edited record", but this only executes if the user closes the form (abandoning the record)...not escaping out of change mode...
                          Last edited by hov333; 05-15-2013, 01:54 PM.

                          Comment

                          Working...
                          X