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

How to Query on keywords

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

    How to Query on keywords

    Hi there,

    I am in the process of finishing my first project in Alpha Five ( a publication database). I have my data, my keywords are organised correctly but I have now hit a snag in that I am unsure how to query my keywords.

    I have used the query genie and we can search on a single keyword, but not on multiple ones. Comes up with blank results. I would also like to have a form that the users can search on. I have my database with some dummy data in it attached, and would greatly appreciate any of the gurus here to take a look at it.

    Thanks to those people that have given their ideas such as Peter Wayne, Mike Wilson and others that gave me ideas...especially keywords and auto fill in for fields. It has been a great help and with this final piece of the puzzle, and the menu cosmetics it will be complete. Many thanks to those that helped.

    #2
    Re: How to Query on keywords

    There are several different ways you can do this kind of thing, and getting the interface right for the user will dictate which direction you go. A simple solution is to create an inverted set, in which your keywords table is primary and your archive is child, linked 1:1 on paper_id.

    Then create a form based on this table and teach the user to use Query by Form. QBF is very powerful and easily accommodates multi-key searches. Just use the comma operator. Check the help file topic on "Query by Form" for details (there's a section there explaining the syntax to use when typing in search keys).

    Example attached, unzip to an empty folder.

    Open Toms_Form, place the form in Query by Form mode, type "microsoft" then a comma then "windows" and run the query. You'll get hits for each article that has a "microsoft" keyword OR a "windows" keyword. (omit quotation marks when typing the search keys)
    Last edited by Tom Cone Jr; 09-08-2008, 04:34 PM.

    Comment


      #3
      Re: How to Query on keywords

      Thank you very miuch time for replying back. This is exactly what I was looking for. Just a quick query...does the QBF also accomodate a search where I want to search for microsoft and windows?

      Many thanks.

      Kind regards,

      Wei-Yen

      Comment


        #4
        Re: How to Query on keywords

        Off hand I don't know if QBF can handle an "AND" query when each record contains only a single keyword. I suspect you'll need a different approach if that's what you need. As I said there are several different ways of going about this. You need to decide how your users are going to want to search...

        Comment


          #5
          Re: How to Query on keywords

          Hi,

          it would seem that the client is wanting to use the 'and' function in their searches. They would like to include 'and' in their search criteria, instead of OR as specified in QBF. I would very appreciative if you let me know what are the other ways that I could use AND?

          Comment


            #6
            Re: How to Query on keywords

            I just had a rethink about this and the user would also like to use the publication data entry form to be used to show the filtered record set.Is it possible transpose the filtered ecord set into another form? Many thanks.

            Comment


              #7
              Re: How to Query on keywords

              I would very appreciative if you let me know what are the other ways that I could use AND?
              I cannot think of a really easy way to do this effectively using your table structures. I can imagine a dialog which prompts the user for a single keyword. A query is run. The user is prompted to end search or supply a new keyword, which is used to refine the query by filtering the returned records only. The user is then prompted to end search or refine further. This will work well, but requires you to do some custom programming. I'm not sure how much of this could be done using action scripting. I have misgivings about this approach in a multi-user setting. Its foreseeable that users might be running searches from different workstations at the same time. I don't recommend it except for situations where only one user will be searching at a time.

              An alternative would be to set business rules for how the user will specify search criteria and build your own custom search routines to handle each possibility. Your script would then parse the input from the user, decide which search "type" to run, and then run it for the user. Again, this will require custom programming.

              At present you have two tables. "Archive" (which stores identifier information about publications), and "Keywords" (which contains one to many records for each Archive record) with each record containing only a single keyword. You use a set with Archive primary and Keywords linked 1:N. An extreme alternative, which I don't recommend but which might merit further study, is to abandon this arrangement in favor of storing all the keywords for a single archive record in a single field in the archive record itself. You could then use string search functions to filter the archive table based on inputs that are received from the user, parsed by your script, and then used to query the table. Again, this will require custom programming.
              Last edited by Tom Cone Jr; 09-10-2008, 06:29 AM.

              Comment


                #8
                Re: How to Query on keywords

                Originally posted by Tom Cone Jr
                I have misgivings about this approach in a multi-user setting. Its foreseeable that users might be running searches from different workstations at the same time. I don't recommend it except for situations where only one user will be searching at a time.
                Thank you Tom. This is not a problem in this particular situation because what they want to do is to have a database as read-only and distribute it to everybody in this case with CDs that has attended the conference.

                A single user setup will work fine and your solution would work.

                Basically my client will be doing the editing and addition of the records. Everyone else will be just be viewing and querying it producing reports/viewing the filtered sets.

                I am a real rookie when it comes to programming this stuff,but i am happy to learn. Again any guidelines or example of code will be helpful. Many thanks, WY

                Comment


                  #9
                  Re: How to Query on keywords

                  WY,

                  Maybe others will chime in to offer better ideas for you. The approach I was imagining of running successive queries, each narrowing the range of records displayed for the user will not work if run from a CD. The sequence I was thinking of goes something like this:

                  a) prompt user for keyword
                  b) run query
                  c) if records were found, ask if finished
                  d) if not finished prompt for next keyword
                  e) "mark" the records found thus far
                  f) run query against the "marked" records to filter them by the second keyword
                  g) loop back to step (c) and continue.

                  To "mark" records found in previous queries requires being able to both read and WRITE to the database. This may not be possible with CD media.

                  I'm out of time and won't be able to respond further. Hopefully someone else will lend a hand.

                  Actually, the more I think about this the more I am coming to believe that you will find it easier to handle both single and multiple-keyword search requests if you store all the keywords for a given publication in a single field. Often a memo field is used for this, since it can handle variable length text. I'll be interested to see if others have better ideas for you.

                  -- tom
                  Last edited by Tom Cone Jr; 09-10-2008, 09:27 AM.

                  Comment


                    #10
                    Re: How to Query on keywords

                    Ah yes, the install files will be on the CD but will be installed on the computer. Thank you Tom for your help. I will follow this up, the guidelines are great and I will certainly follow it up and let the group know of the details.

                    Comment


                      #11
                      Re: How to Query on keywords

                      I am new to Alpha 5. I am working with Tanman on the conference paper project. As it is our first attempt, it has been trying to say the least. Your helps are timely and most appreciated. Thanks for your prompt suggestions and effort in helping us out.

                      With your help and through trial and error I discovered that if I open Archive_keyword_set form, do a query on keyword using Genie, run the query. Change to another keyword, run query again. This time round it prompts for

                      <Search all records>
                      <Search currently selected records>
                      <Extend selection of records>

                      Select the Currently selected records. And it works as it should.

                      Thanks guys.

                      Comment


                        #12
                        Re: How to Query on keywords

                        Con, that's good news. Keeps things simple. I feel a bit foolish not remembering that capability but I rarely use the Genie to do queries, so I was unaware of (or had long since forgotten) its ability to easily search the currently selected records. Good luck with your project and the conference. -- tom

                        Comment


                          #13
                          Re: How to Query on keywords

                          I have been playing with this during the day and came up with this which uses the xbasic version of what Con describes. And then automates it a bit. All the functionality is in the embedded xdialog on the publications_Find form. Single click on each keyword in the left list to choose or unchoose (is that a word?). The choices appear in the the right list. The three buttons are self explanatory I think.

                          You could expand this and get fancy by adding a control so the user could choose between AND and OR. Depending on the users choice you would branch the code to do a different query.


                          EDIT: To test try the keyword xxx. you should get three records. Then zzz should also return three records. Now try xxx and zzz. this should return only two records.
                          EDIT2: Forgot to say that I restricted enters in the form properties which has nothing to do with the queries but keeps the form from going into enter mode when scrolling past the last record.
                          Last edited by Tim Kiebert; 09-11-2008, 10:27 AM. Reason: Test suggestion
                          Tim Kiebert
                          Eagle Creek Citrus
                          A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                          Comment


                            #14
                            Re: How to Query on keywords

                            Tim, thanks for your prompt posting for automating my manual procedure with Xdialog. I had a quick play this morning, it is exactly what I wanted.

                            I had not done any Xdialog programming. So it would educational for me to dissect your Xdialog coding. It will make a lot more sense on something I have been working on.

                            Could you please tell how I could copy your Publication_find form to my conference database? Thanks heaps.

                            Comment


                              #15
                              Re: How to Query on keywords

                              Thank you very much for your reply Tim, and the time that you spent on it. I have a query...I was wondering if that super control can be filtered on the current record set? What we werr thinking of was using with the results of the QBF results. It would be brilliant if this can be done. Many thanks.

                              Comment

                              Working...
                              X