Alpha Video Training
Results 1 to 4 of 4

Thread: The, An, A in titles

  1. #1
    Member
    Real Name
    James Urbanski
    Join Date
    May 2000
    Location
    New Port Richey, FL
    Posts
    620

    Default The, An, A in titles

    We know that when we alphabetize titles, the articles The, An, and A need to come at the end preceeded by a comma. "Ash Grove, The" not "The Ash Grove"
    Thanks to Cal Locklin, I found a formula to make this work. In the record, store the title as written, "The Ash Grove" and then use the following formula in your order expression and as a calculated field for display. The title will appear in the proper order and display as "Ash Grove, The"


    IF( WORD(Title,1)='The' ,alltrim(SUBSTR(Title, at(" ",Title) + 1) )+", "+word(Title,1),if(word(Title,1)='An',alltrim(substr( Title,at(" ",Title)+1) )+", "+word(Title,1),if(word(Title,1)='A',alltrim(substr(Title,at(" ",Title)+1))+", "+word(Title,1),Title)))

    Thanks again to Cal

    Jim

  2. #2
    Member
    Real Name
    Steve Andrews
    Join Date
    Jan 2004
    Location
    Mahwah, NJ
    Posts
    644

    Default RE: The, An, A in titles

    James,

    Rather than repeat the return expression thrice, you could use a much shorter expression:

    if(*word("THE AN A",upper(word(Title,1))),alltrim(SUBSTR(Title, at(" ",Title) + 1) )+", "+word(Title,1),Title)

    My 2 cents,
    Steve

  3. #3
    Member
    Real Name
    James Urbanski
    Join Date
    May 2000
    Location
    New Port Richey, FL
    Posts
    620

    Default RE: The, An, A in titles

    Very interesting. I really don't understand the formula. I'll try to study it and break it apart so that I can understand it.

    Thanks
    Jim

  4. #4
    Member StephenP's Avatar
    Real Name
    Stephen Pilon
    Join Date
    Apr 2000
    Location
    Front Royal, Virginia
    Posts
    491

    Default RE: The, An, A in titles

    Steve/James, et al,

    I like this function. But I also need to include many other articles, including foreign articles. I simply replaced the hard-coded article list with a variable called ARTICLES and then used another window to allow the user to enter additional articles which were then added to the list. This will be great for my database of Senior Theses at my college, where thesis are written in many different languages.

    Stephen Pilon

Similar Threads

  1. fields and field titles
    By dik_coleman in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-15-2003, 08:58 PM
  2. fields and field titles
    By dik_coleman in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-12-2003, 09:40 AM
  3. Window Titles
    By Jeff, Richards in forum Alpha Five Version 5
    Replies: 9
    Last Post: 11-30-2003, 12:26 PM
  4. Form Design Field Titles
    By Charlain in forum Alpha Five Version 5
    Replies: 3
    Last Post: 10-10-2002, 04:43 PM
  5. Popup titles
    By Jeff Moses in forum Alpha Five Version 5
    Replies: 11
    Last Post: 08-13-2002, 08:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •