Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jan Hansen 7 posts 27 karma points
    Oct 27, 2015 @ 12:29
    Jan Hansen
    0

    Prevalues sortorder not reflected on output

    Hi

    I have a custom checkboxlist datatype where I have entered pre-values with valid professions. A, B and C

    When I output people's professions in a comma-separated list like this:

    @employee.professions.Replace(",", ", ")

    • I get "A, B, C" because all three are checked.

    Then I move C between A and B on the datatype, but I still get "A, B, C".

    It looks like the selected values are written in the order they were created in the database, re-ordering the options in the datatype editor doesn't change anything in the output. Is there anything I can do to see and use the sortorder, or manually do an "OrderBy" when I output values?

    Second, I might want to output selected values alphabetically - is that possible? Independent of the sortorder used internally in Umbraco.

    BR, Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies