Skip to main content
Inspiring
February 5, 2016
Answered

Index sorting

  • February 5, 2016
  • 1 reply
  • 1564 views

In Swedish we have 3 letters at the end of the alphabet, å, ä and ö (in that order). If I make a table and ask FM to sort it for me, all letters come in the right order. But if I create an index FM treats ö as an o, and å and ä as a.

Is there a way to fix this? We use FM 7.2

    This topic has been closed for replies.
    Correct answer Mike-Hardy

    Mike-Hardy

    I have now made a "dummy" index, just to explain what I mean (I changed the type so it's easier to see).


    ----------------------

    This is the result I want, the index sorted right:

    A

    alla 14

    Annat 14

    C

    chans 14

    CW working 14

    F

    frånslagen 14

    O

    orsak 14

    P

    parentes 14

    Å

    Ågren 14

    åker 14

    Ä

    är 14

    Ärla 14

    Ö

    öken 14

    Övrigt 14


    All letters sorted in the right order, and no difference between upper case and lower case

    ----------------------------------

    Here is the standard reference pages:

    1, 2–3

    Symbols[\ ];Numerics[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z

    <$symbols><$numerics><$alphabetics>

    --–—

    Level1IX

    openObjectId <$relfilename>:<$ObjectType> <$ObjectId>

    <$pagenum>

    ---------------------------------

    The index ends up like this:

    A

    Ågren 14

    åker 14

    alla 14

    Annat 14

    är 14

    Ärla 14

    C

    chans 14

    CW working 14

    F

    frånslagen 14

    O

    öken 14

    orsak 14

    Övrigt 14

    P

    parentes 14

    --------------------

    As you can see å and ä is under A and ö is under O.

    -------------------------

    If I add our special letters at the end the reference looks like this:

    1, 2–3

    Symbols[\ ];Numerics[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;Å;Ä;Ö

    <$symbols><$numerics><$alphabetics>

    --–—

    Level1IX

    openObjectId <$relfilename>:<$ObjectType> <$ObjectId>

    <$pagenum>

    -------------------------------

    The index ends up like this:

    Å

    Ågren 14

    åker 14

    alla 14

    Annat 14

    är 14

    Ärla 14

    C

    chans 14

    CW working 14

    F

    frånslagen 14

    Ö

    öken 14

    orsak 14

    Övrigt 14

    P

    parentes 14

    ------------------

    For some reason a, å and ä is in the beginning under Å... ö is under O.

    ----------------------------------

    To remove <$alphabetics> seems like a bad idea. It's back now.

    I have tried all other combinations; (Aa;Bb; and so on, nothing helps).

    I hope you understand what I mean and what I want.


    I understood what you meant, but didn't have any documentation available, and so was trying the wrong thing.

    I've just read Specify sort order for an index in the FM12 help, and it is now clear to me that the SortOrderIX paragraph is what needs changing. I have replaced the <$alphabetics> building block with its default value (as given in the above page of documentation), and then moved your Swedish letters to the end of the sort order. This is the result:

    • for the GroupTitlesIX paragraph:
      Symbols[\ ];Numerics[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;Å;Ä;Ö
    • for the SortOrderIX paragraph:
      <$symbols><$numerics>AÁÀÂÃaáàâ㪠Bb CÇcç Dd EÉÈÊËeéèêë Ffƒ Gg Hh IÍÌÎÏiìíîï Jj Kk Ll Mm NÑnñ OÓÒÔÕØoóòôõøº Pp Qq Rr Ss Tt UÚÙÛÜuúùûü Vv Ww Xx YŸyÿ Zz Åå Ää Öö

    It works for me in FM12.

    1 reply

    Inspiring
    February 5, 2016

    I solved it. Or at least, I made it work. This is how my reference page looks like now:

    ---------------------

    1, 2–3

    Symbols[\ ];Numerics[0];a;b;c;d;e;f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y;z;å;ä;ö

    <$symbols><$numerics>

    --–—

    Level1IX

    openObjectId <$relfilename>:<$ObjectType> <$ObjectId>

    <$pagenum>

    -----------------

    I added our special letters at the end, and removed <$alphabetics> as I read somewhere here here that FM got confused otherwise. Then I got the problem that the order was first all words that started with upper case, and then all words that started with lower case. So I changed all my indexed words to only contain lower case letters, and I also changed the line above to only contain lower case letters.

    Inspiring
    February 8, 2016

    If anybody could give me a tip of how to mix lower case letters and upper case letters, I would be thankful. If I index words that start with a capital letter or only contains capital letters, that word comes before all other words that start with that letter.


    Example:

    D

    DIN

    d

    data

    derivata

    duplikat

    ....

    I would like it to say

    D (or d)

    data

    derivata

    DIN

    duplikat

    Participating Frequently
    February 9, 2016

    Try changing your GroupTitlesIX paragraph to use upper case:

    Symbols[\ ];Numerics[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z,Å,Ä,Ö