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

Using Soundex in an Index or Query for Searching

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

    Using Soundex in an Index or Query for Searching

    I haven't had a reason to try Soundex() in an index or query before so am not sure how this might work if a user tries to do a search but doesn't know how to spell the name.

    I have an xdialog that does a progressive search matching on 4 different fields: LASTNAME, FIRSTNAME, SSN & DOB as the user types. Soundex wouldn't help for SSN or DOB. But what I am finding is that if the user types in 'zeig' in an attempt to find ziegler - he isn't going to find it because he spelled it wrong. And if the user who input the record spelled it wrong, typing zieg won't find it either.

    I could use a pointer in the right direction as to how to modify my script to use this function on a partial entry - if that's possible.

    I am using this keylist_build now:

    vKey_rl_def_orig = "kl=tempmemb,{keylist_build("H=.05,1:18[Lname],2:15[Fname],3:3[Mi],4:10[Dob],5:12[Ssn],6:12[Memb_Id]",''+KEYLINK,left(''+lname,18),left(''+fname,15),left(''+mi,3),left(''+dob,10),left(''+ssn,12),left(''+memb_id,12))}{left(dtoc(dob),len([varC->type_in])) = [varC->type_in] .or. left(lname,len([varC->type_in])) = [varC->type_in] .or. left(fname,len([varC->type_in])) = [varC->type_in] .or. left(ssn,len([varC->type_in])) = [varC->type_in] )}"
    Last edited by MoGrace; 08-20-2018, 07:42 PM.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    #2
    Re: Using Soundex in an Index or Query for Searching

    I've never had occasion to use it in an index either but the docs say it works in an index to find "close" spellings.

    You typically use SOUNDEX() in index expressions and filter expressions to search for records when you are not sure of the correct spelling of the value you want to find.
    There can be only one.

    Comment


      #3
      Re: Using Soundex in an Index or Query for Searching

      For my example, I did check that zieg and zeig returned the same value, so that's a start.
      Robin

      Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

      Comment


        #4
        Re: Using Soundex in an Index or Query for Searching

        I've used it Robin and it works well but is not infallible. You may get the odd spurious mismatch, but that is largely academic.
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.

        Comment


          #5
          Re: Using Soundex in an Index or Query for Searching

          In the filter section for the keylist_build above - how would I include soundex() for this section?

          left(lname,len([varC->type_in])) = [varC->type_in]
          Robin

          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

          Comment


            #6
            Re: Using Soundex in an Index or Query for Searching

            Just guessing


            soundex(lname) = soundex([varC->type_in])
            Last edited by Stan Mathews; 08-21-2018, 03:59 PM.
            There can be only one.

            Comment


              #7
              Re: Using Soundex in an Index or Query for Searching

              One thing I have had to do is concatenate fields before running soundex.
              Looks like you might be able to do similar.
              Keylist looks a bit complex for my simple mind.
              If all you want to do is suggest possible matches on name, then soundex the name less any spaces and show the rest of the data for the user to do their selection. Then it's up to their power of recognition.
              See our Hybrid Option here;
              https://hybridapps.example-software.com/


              Apologies to anyone I haven't managed to upset yet.
              You are held in a queue and I will get to you soon.

              Comment


                #8
                Re: Using Soundex in an Index or Query for Searching

                Well Soundex() does work - sort of. It helps to narrow the list but returns many non-matches too. Eg. "julee" finds Julie and Julian but also Joel which hardly sounds alike but do all have the same soundex value of J400.
                Robin

                Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                Comment


                  #9
                  Re: Using Soundex in an Index or Query for Searching

                  Since this is a temporary table, I added 2 fields with calc field rules to hold the soundex value for each of the lname and fname fields. Now my search on this table can match those fields to the soundex value of what the user types into the search variable. If the user types in "mclan" it will find both McClane and McClain and only a couple of others that don't really match the Lname or Fname fields. However the user must type in enough letters to get a soundex value that matches. So if "zigler" is typed, ziegler and zeigler is found, but if a partial entry like "zig" is entered, it won't find anything. I think this will probably accomplish what I was looking to do - which was to find a name even it was misspelled.

                  Using my new fields in the query filter:

                  LNAMEX = soundex([varC->type_in]) .or. FNAMEX = soundex([varC->type_in])

                  I also added indexes for the new fields, though I am not sure that is needed but might use LQO in the search.

                  And the temp table is only updated automatically when new records are added to the 'live' table. IOW not when the user corrects a record. There is an option to rebuild the table manually too, so if the users want to see their changes in the search list, they can.
                  Last edited by MoGrace; 08-22-2018, 12:02 PM.
                  Robin

                  Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                  Comment


                    #10
                    Re: Using Soundex in an Index or Query for Searching

                    And another thing to add to your repertoire.

                    Try [Difference()] categorises the results (1-4) where 4 is a good match, 1 is a very lose match using Soundex.

                    Might simplify things and get it a bit more accurate.

                    I work in some government places where a search of, say %billy% is used. If there is no result, the new record is for a guy named %billy%.
                    Cut and paste at you peril!
                    See our Hybrid Option here;
                    https://hybridapps.example-software.com/


                    Apologies to anyone I haven't managed to upset yet.
                    You are held in a queue and I will get to you soon.

                    Comment


                      #11
                      Re: Using Soundex in an Index or Query for Searching

                      That's a function I have not looked at before. I just don't know how to work that into my query without some sort of case statement. Also this is an xdialog. If it was a form search, maybe...
                      Robin

                      Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                      Comment

                      Working...
                      X