• I have a problem related to column based search.

    If you enable the listbox feature on a id column, the content in the list box is sorted by the id, not by the value the id column is related to.

    For example, if you have a table student:

    id,name,school_id
    1,Jack,1
    2,Mary,3
    3,Tom, 2
    4,Kate,4

    Then you have a table school looks like this:
    school_id,school_name
    1,Marshall High
    2,George Washington High
    3,James Madison High
    4,Thomas Jefferson High

    If you enable the school_id in table student for listbox search
    The listbox will display school names, but sorted by school_id, not by school name

    This become an issue if the list of school becomes large and you can’t find the value you are looking for any more. Can you create an option to sort by value in the relationship, rather than the id. I think you can add a quick checkbox in the relationship tab when designing the template.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @pixw,

    Do you have a public URL I can visit to view this table? You can use the contact form on the plugin website if you prefer to share the link in private.

    Without having seen the table I presume this is a lookup column? If you want to make a lookup column searchable, you need to create a view that shows the lookup value instead of the id. That should give you the correct result. Make sure you have proper indexes if this is a large table. Otherwise a search might have a negative impact on performance.

    Does this help?

    Thanks,
    Peter

    Thread Starter Pixel Wall

    (@pixw)

    So, let me make a slight correction of the problem. The pulldown list in search filter is showing the school name, but the list is sorted based on the order of the occurrence of school_id in the student table.

    So, in the example i provided, the occurrence of school_id in the student table is: 1,3,2,4. Then the pull down list will be:

    1,Marshall High
    3,James Madison High
    2,George Washington High
    4,Thomas Jefferson High

    What I would like to see in the pull down list is a list of school names sorted alphabetically, like:

    2,George Washington High
    3,James Madison High
    1,Marshall High
    4,Thomas Jefferson High

    Even I create a view for the lookup table and sorted by the school name column, the pulldown list is still ordered by the occurrence of id, not by value.

    I don’t have the site publicly accessible. But it’s very easy to reproduce the issue.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @pixw,

    Is this a Data Publisher or Data Projects issue? On the back-end or front-end?

    Sorry, this works for me. At least the way I test it. Can you tell me what I need to do to reproduce this issue?

    Thanks,
    Peter

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Individual column listbox sorting issue’ is closed to new replies.