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

Query Search Questions

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

    Query Search Questions

    I have attached an example of an issue I have been trying to correct this past weekend. Here's my problem/question:

    When the user presses "search equipment" and enters for example "55" in the search "ESN Number" the seach script filters and shows only the ESN numbers that start with "55" but the user can only see the record(s) if they scroll thru Browse2 and finds the record(s) containing ESN Number starting with "55".

    My question is, what code is needed to add in the script so that if a user enters (for example) "55" in ESN Number search field only the customers having an ESN number starting with "55" are shown in Browse2.

    In the attached example, when user wants to search by ESN Number "55", I would like it to show only the customer "Jack's Auto" in Browse2.

    Any and all help is greatly appreciated... JON
    Attached Files

    #2
    Re: Query Search Questions

    THis does it
    1. In the set structure, table equipment, set include from parent to "Match"
    2. nothing more, it will work now

    Confucius: Quick when you send sample

    Comment


      #3
      Re: Query Search Questions

      Thanks Ray. Made changes and it works with one exception. When I type in "55" in search by ESN Number, browse 2 shows "Ace Heating" and "Jack's Auto".

      Why is Ace Heating being shown? Is there something further that needs to be done to not show this record?

      Thanks again... JON

      ** Tried serveral options for searching, and no matter what I do, "Ace Heating" is always displayed in Browse 2.
      Last edited by jbk; 01-07-2013, 03:18 PM.

      Comment


        #4
        Re: Query Search Questions

        Jon,

        When working with a one-to-many set there are at least two different kinds of queries that can be run involving the linked one-to-many child table. The approach to doing each differs.

        One type of query says to Alpha: Display only the linked child table records that match the search criteria. But continue to show all parent records whether they are linked to matching records or not. This is the approach we used in your previous msg board thread.

        The other type of query says to Alpha: Look through all the child table records and display only the parent records which are linked to a child that matches the search criteria. This is what you are now attempting with your fourth search parameter. It cannot be achieved using the same approach employed before. In this latter case you can't winnow down the parent table records being displayed simply by filtering the child table.

        Does this make sense?

        -- tom

        Comment


          #5
          Re: Query Search Questions

          Yes and No. Why does the current filter show filter down to only "the first record in the table" and the desired search criteria. I placed your search script and Ray's suggestions in my "real live" program and it does the same thing. My "real live" program has approx 600+ records and it always show the first record and the desired records that have search criteria. Any help would be appreciated... JON

          Comment


            #6
            Re: Query Search Questions

            Try filtering on both tables? I changed some code in both scripts. Get the account numbers with the equipment and filter the parent from that list using inlist2()

            BTW - I switched the browse order so parent on the left in example (I read left to right parent to children)
            Attached Files
            Last edited by Mike Wilson; 01-07-2013, 03:44 PM.
            Mike W
            __________________________
            "I rebel in at least small things to express to the world that I have not completely surrendered"

            Comment


              #7
              Re: Query Search Questions

              Jon, I don't understand post #5.

              My comments have been directed to the general one-to-many set, without Ray's modification to the set parameters. His changes to your set specifications will impact the range of parent table records that are displayed. I have little experience deploying his approach. Most of my clients get nervous when their parent table records seemingly "disappear". And its hard to add the "first" child record for a parent using Ray's set specification.

              I'm not offering a solution. I'm challenging you to see the difference in how the two types of queries would work. You will have difficulty trying to do both kinds of queries in a single search script.

              Comment


                #8
                Re: Query Search Questions

                Okay, Thank you... JON

                Comment


                  #9
                  Re: Query Search Questions

                  Thank you Mike for your example. Your example works exactly as I wanted. Will implement into "Real Live" program and further test.

                  Thank you... JON

                  Comment


                    #10
                    Re: Query Search Questions

                    Jon,

                    Here's an example using a new button.

                    Uses a crosslevel query to find customers based on whether or not they have ESN numbers in the child table that begin with a user specified search string.

                    Unlike my previous example I'm not filtering the child table at all. And, the query employed is not a base level query. So the Show_All button on the form's toolbar will release the query.

                    Hope this helps.

                    -- tom

                    Comment


                      #11
                      Re: Query Search Questions

                      Jon - when looking at Mikes example, I see an additional Torch record #13 with ESN starting 55 in the equipment table.
                      I suspect something else going on there.

                      All three methods work when I test. But I am using v10

                      Tom you can't get away from the clients' seeing diminishing customer records in any event. If you want to achieve what Jon explains.

                      Comment


                        #12
                        Re: Query Search Questions

                        Hi, Ray.

                        In my own clumsy way I've been trying to get Jon to think clearly about his true goal. Is it searching Customers based on criteria in Equipment, or is he wanting to display only the child table records that meet the search criteria? Depends entirely on his app. I've just been trying to help him understand the differences.

                        Regards,

                        -- tom

                        Comment


                          #13
                          Re: Query Search Questions

                          Tom, to me what I want to do is very simple. Using the example, If a user wants to find all customers that have a "Iphone 5" they would simply choose to search by "Model Number" type in "Iphone 5" and all customers having "Iphone 5s" would be displayed in browse 2 and there "Iphone 5" equipment would be displayed in browse 1.

                          Now the solution to this for a amateur like me is not so simple, thus the request for help.

                          Mike's solution works in the example provided by him but I'm having issues with it working in my Real Live program.

                          Once again... Thanks Tom, Ray and Mike.... JON

                          Comment


                            #14
                            Re: Query Search Questions

                            Tom, just opened your newest example. Is there anyway of adding the additional search options (model number and MFG) on a single button in the custom query you created?

                            Comment


                              #15
                              Re: Query Search Questions

                              This example permits the user to search by MFG or by ESN.

                              Records in Browse1 are NOT filtered.

                              Records displayed in Browse2 ARE filtered.

                              The example searches for Customers based on criteria in the linked one-to-many child (Equipment) table.

                              Hope this helps.

                              Comment

                              Working...
                              X