Sorting Join() of MultiValue-Parameter

3 posts, 0 answers
  1. Diego
    Diego avatar
    7 posts
    Member since:
    Jul 2017

    Posted 08 Sep Link to this post

    Hello,

    I show the selected values from an ASC sorted MultiValue-Parameter with

    Join("; ", Parameters.param1.Label).

    But I have the problem that the displayed values aren't sort. They are in the order as I have selected them before in the Multi-Value-DropDown.

    How can I sort the displayed values?

    Thanks.

    Regards,
    Diego
  2. Missing user
    Missing user avatar

    Posted 12 Sep Link to this post

    Hello Diego,

    Indeed the values from a sorted MultiValue Parameter when displayed with Join function appear in their order of selection since this is the order they have been added to the collection. This behavior is by design.

    If it is necessary to show the chosen parameter values sorted, a sorted collection should be passed to Join function. I would suggest you to create a custom sorting function and use it to sort the values before joining them, i.e. something like:
    Join("; ", CustomSort(Parameters.param1.Label)).

    I hope this would help.

    Regards,
    Todor
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Missing user
    Missing user avatar

    Posted 12 Sep Link to this post

    Hello Diego,

    Just to add that in order to use custom functions in expressions you can follow this article.

    Regards,
    Todor
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top