Skip to main content
October 19, 2023
Question

Alphabetize User Filters?

  • October 19, 2023
  • 4 replies
  • 0 views

Is there a way to alphabetize user filters within a read-only grid?

My thought process was to use the a!sortInfo() for the related filter, however using this function has not worked for me. I have spent a few hours searching documentation and have not come to the conclusion I need, so I have decided to ask. 

    4 replies

    stefanhelzle0001
    Brainy
    October 20, 2023

    I am not 100% sure I understand your ask. If you are looking for making the choices of one filter depending on the selected of another filter, you will have to build a custom grid + filters UI.

    October 20, 2023

    Thanks for your reply. I'll try my best to clarify, I've only been working with Appian for three weeks. 

    The choice of my filter is not dependent on another filter, I just want to alphabetize the selections within the user filter. Let's say that my user filter is "last names" and it's pulling from a record. If we're looking at the expression editor, it looks like:

    a!gridField(

    ...

    userFilters: {

    recordType! [record name].filters.lastNames

    }

    That is what I want to alphabetize. I thought I could do so with " a!sortInfo(recordType! [record name].fields.lastNames, true())," , but it doesn't seem like this is allowed. 

    Hope this clarifies. 

    stefanhelzle0001
    Brainy
    October 20, 2023

    With "alphabetize" you mean you want to sort the names?

    You would have to do this in the records editor where you define the selection options for that filter.