none
Can we sort with First Name and Last name in Kanji character in Employee Directory ? RRS feed

  • 質問

  • Hello Everyone,

    I am trying to create an employee directory and I have created an Enterprise Search site. We are a group of companies and mainly work with Japanese. When editing the Search Results web part I have included this string into the "Available sort orders (JSON) field:
    [{"name":"First Name (A - Z)","sorts":[{"p":"firstname","d":0}]}, {"name":"First Name (Z - A)","sorts":[{"p":"firstname","d":1}]}, {"name":"Last Name (A - Z)","sorts":[{"p":"lastname","d":0}]}, {"name":"Last Name (Z - A)","sorts":[{"p":"lastname","d":1}]}]

    But the matter is the first name and last name are (Japanese Names) kanji characters. The preferred name is English + Kanji characters; preferred name is not supported to sorting. The account name also not supported by sorting. The sorting work with only English names only. Does anyone have any suggestions as to what may be causing this?

    Thanks & Regards

    2020年6月2日 2:57

すべての返信

  • To come to the point, you can't sort Japanese name without "yomigana" data.

    English is phonogram language. Japanese is ideogram language. That means Japanese Kanji can not read without its readings (yomigana).

    English can be sort with ASCII character code order(A-Z). Also kanji can be sort with it's caracter code order, but it has no meanings in Japanese. This is why sort is not working correctly.

    So need to add employee data column "firstname_yomi" and "lastname_yomi" and use it to implement sorting.

    [
        {
            "id": 0,
            "firstname": "John",
            "lastname": "Doe",
            "firstname_yomi": "John",
            "lastname_yomi": "Doe"
        },
        {
            "id": 1,
            "firstname": "太郎",
            "lastname": "山田",
            "firstname_yomi": "Taro",
            "lastname_yomi": "Yamada"
        }
    ]
    



    2020年6月9日 10:23
  • Hi user_02,

    I am sorry for the late reply.
    I appreciate your response, but I couldn't do it properly. Let me know how could I enter this code to my code?

    Could you help me to solve this matter?

    Thanks & Regards,
    Shrinika Atapattu
    2020年6月24日 3:14