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

Inverting a Fullname

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

    Inverting a Fullname

    In my old application I could define a field as INVERTED:
    Field type: Inverted Alpha Numeric Counter Date Time
    My A5 application Imports from external TEXT files (over which I have no control) that only have a Fullname field:
    Paul J Kosko,Jr
    The Key or index would then sort by:
    Kosko,Jr Paul J
    If I opened on the index, the order would be:
    ROBERT M BANKSTER
    PAUL J KOSKO
    ALLEN A MCMANN
    If you did a search you would enter Kosko instead of Paul J Kosko,Jr
    Also, the user prints File Folder Labels where they want the first 4 of the Last Name:
    K
    O
    S
    K
    on the edge of the label in BIG letters so it's easy to find a name in the vertical folder storage, where there are 1000's of folders.
    So, I have to have a Last Name isolated to do this.
    There are many exceptions to this "invert" :
    Ex:
    AMERICAN INSULATION INC. (I'd want (AMER). I don't want INC
    THE DOROTHY WEST GROUP LLC (I'd want WEST). I don't want LLC or GROUP or THE. ie WEST GROUP LLC THE DOROTHY. or
    at least DOROTHY WEST GROUP LLC THE
    The invert type field took care of 85%. The 15% where inverted key/index sort would create a mess as above, I had to write a yarnball UDF to test if the name indicated a Company or Title or Both, and no adjectives at the beginning and ignore titles at the end: LLC INC CO CO. DDS PHD. N.A. III etc. Even then some would slip through.

    I've searched the archives for "invert" and nothing relates that I found.
    Any Ideas?
    First Love

    #2
    Re: Inverting a Fullname

    Originally posted by SMARTII View Post
    Any Ideas?
    Ask a question if you have one.

    Do you want to know how to search for Kosko in a fullname field? Try using Full Text Indexing.

    If you want to order by lastname for proper names and significant word in company names I think you'll have to redo your udf in the current version of Alpha. Only you can determine what the significant word might be. You might consider adding a single character field to indicate whether the full name is proper or company which your udf could utilize.
    There can be only one.

    Comment


      #3
      Re: Inverting a Fullname

      Sorry, the q. would be how to isolate the last name.
      q2. would be is there an A5 function that at least does this on a simple proper name as in MARY T GIOVANNI returns GIOVANNI MARY T
      First Love

      Comment


        #4
        Re: Inverting a Fullname

        Not a single function but many functions to do what you want. One way ...

        Code:
        nme = "MARY T GIOVANNI"
        
        ? word(nme,3," ")+" "+word(nme,1," ",2)
        = "GIOVANNI MARY T"
        There can be only one.

        Comment


          #5
          Re: Inverting a Fullname

          Tom,

          Here is some code that I have on a full name field that tries to properly switch person's name to last name first.

          Jeff Ryder to Ryder Jeff
          Jeff A Ryder to Ryder Jeff A
          Jeff A Ryder III to Ryder III Jeff A
          Jeff Ryder JR to Ryder JR Jeff
          Jeff de Ryder to de Ryder Jeff

          Code:
          dim vStr as c
          dim vNum as n
          vStr=topparent:name.text
          vNum=w_count(vStr)
          
          'parse name to try to create sort key
          select
              case vNum = 2
              	topparent:sortkey.value=word(vStr,2) + " " + word(vStr,1)
              case vNum = 3
              	if len(word(vStr,2)) = 1 then
              		topparent:sortkey.value=word(vStr,3) + " " + word(vStr,1," ",2)
              	else
              		topparent:sortkey.value=word(vStr,2," ",2) + " " + word(vStr,1)
               	end if
              case vNum = 4
              	topparent:sortkey.value=word(vStr,3," ",2) + " " + word(vStr,1," ",2)
              case else
              	topparent:sortkey.value=vStr
          end select
          Jeff Ryder

          Comment


            #6
            Re: Inverting a Fullname

            There was a thread from well over a year ago dealing with exactly this same issue. Will take some search to find it but it covers it pretty well specially unusal names e.g. Oscar de La Hoya, George Herbert Walker Bush or names ending with different suffix etc.

            Comment


              #7
              Re: Inverting a Fullname

              Originally posted by G Gabriel View Post
              There was a thread from well over a year ago dealing with exactly this same issue. Will take some search to find it but it covers it pretty well specially unusal names e.g. Oscar de La Hoya, George Herbert Walker Bush or names ending with different suffix etc.
              Now if only I can find the right search words.. that won't give me 500 threads.
              First Love

              Comment


                #8
                Re: Inverting a Fullname

                Uh, think those might be the search words?
                There can be only one.

                Comment


                  #9
                  Re: Inverting a Fullname

                  Here you go.

                  Comment


                    #10
                    Re: Inverting a Fullname

                    Originally posted by G Gabriel View Post
                    Here you go.
                    I thank you all for your input on this.
                    I examined 3 clients records for the last 8 months (about 8,000 names). These names are all on Legal documents of registered property
                    First, many were Entities other than an individual.
                    Those I don't want to invert. The only thing I want to do is remove any common prefix adjectives. The only one I found in the sample was "THE ".
                    That had to be removed. Otherwise use the Entity as is.
                    How to tell if it's an Entity other than an individual?
                    Create a list of all the indicators in the name that would point to it being an Entity:
                    companylist = <<%a%
                    %a%
                    and compared with the fullname to see if a company-like indicator exists in the fullname.
                    '------------
                    Next I had the individuals with all kinds of titles.
                    The titles and variations were put into another List:
                    titlelist = <<%b%
                    %b%
                    and compared with the fullname to see if a title exists in it.
                    The title gets stripped from the name leaving and untitled common name.
                    Then the last name is taken from that untitled name.
                    Then Invert takes place.
                    '------------
                    The nice thing about the lists is that you can easily add to them as necessary with no other fuss.
                    '------------
                    Finally there is the untitled individuals.
                    The Invert takes place.
                    '------------
                    I did use a GOTO "DONE" label instead of an EXIT FUNCTION.
                    So, spank me..

                    I invite anyone to find a combo where it fails as intended.
                    Then I can work on it some more.

                    I especially thank jaryder and
                    G Gabriel

                    Ok:
                    Here it is:
                    PHP Code:
                    FUNCTION invrtnam AS (fulnam AS )
                    Dim iscomp as c
                    Dim istitle 
                    as c
                    Dim prefx 
                    as c
                    Dim spc 
                    as c
                    Dim coma 
                    as c
                    Dim newnam 
                    as c
                    Dim compnam
                    Dim titlelen 
                    as n
                    spc 
                    chr(32)
                    coma chr(44)
                    If 
                    left(fulnam,3)= "THE"
                     
                    compnam mid(fulnam,5)+spc+"THE"
                        
                    invrtnam compnam
                     
                    goto DONE
                    end 
                    if
                    '-------- Do not Invert a Company type ----
                    companylist = <<%a%
                    CO
                    CO.
                    INC
                    INC.
                    INC/
                    LTD
                    LTD.
                    LLC
                    LLC.
                    BANK
                    BANC
                    SERVICES
                    INVESTMENTS
                    LP
                    CORP
                    CORP.
                    COMPANY
                    OF
                    LP
                    LT
                    INDUSTRIES
                    AGENCY
                    SPECIALIST
                    PRODUCTION
                    PLUMBING
                    USA
                    ENTERPRISES
                    ENTERTAINMENT
                    GROUP
                    %a%
                    '
                    ------------
                    iscomp word_in_common(fulnam,companylist,spc)
                    if 
                    iscomp <> ""
                      
                    compnam fulnam
                      invrtnam 
                    compnam
                      
                    goto DONE
                    end 
                    if
                    '------------ It's a Person -------- 
                    'Personal names will then be inverted
                    titlelist = <<%b%
                    II
                    IV
                    JR
                    SR
                    MD
                    MD.
                    MD PA
                    M.D. PA
                    MD,PHD
                    MD,PHD.
                    DDS
                    DDS,INC.
                    DDS,INC.
                    II
                    III
                    IV
                    PHD
                    PHD.
                    LSE
                    (LESSEE)
                    LESSEE
                    PA
                    PA.
                    MD
                    PC
                    CPA
                    CPA.
                    %b%
                    '
                    ------------
                    istitle word_in_common(fulnam,titlelist,spc)
                    titlelen len(istitle)
                    if 
                    titlelen >0  ' remove the title b4 inverting
                      notitlenam = left(fulnam,len(fulnam)-titlelen -1)
                      lastnam = lastword(notitlenam)
                      newnam = \
                      lastnam + spc + istitle + spc + left(notitlenam,len(notitlenam)-len(lastnam)-1)
                      invrtnam = newnam 
                    else
                      titlelen = len(fulnam)
                      lastnam = lastword(fulnam)
                      newnam = lastnam + spc + left(fulnam,titlelen - len(lastnam)- 1)
                      invrtnam = newnam
                    end if
                    DONE:
                    END FUNCTION 
                    Last edited by SMARTII; 11-05-2009, 09:24 PM.
                    First Love

                    Comment


                      #11
                      Re: Inverting a Fullname

                      How about "Joe Richman Bank"?
                      There is actually a guy by that name, I am not making it up.

                      Comment


                        #12
                        Re: Inverting a Fullname

                        Originally posted by G Gabriel View Post
                        How about "Joe Richman Bank"?
                        There is actually a guy by that name, I am not making it up.
                        As long as he's not in Texas....
                        I also found a Yang Zu INN as a person.
                        as in
                        Rusty Canyon INN
                        I guess I could remove BANK because nearly all banks include NA or N.A.
                        Last edited by SMARTII; 11-05-2009, 09:16 PM.
                        First Love

                        Comment

                        Working...
                        X