We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

Display the user list in alphabetical order by last name in the user picker field?

Certified Senior Developer

Hi All,

I need to show the list of users using only the last name in alphabetical order. Users present in the environment.

how to display all the users using user picker field?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to vaibhav.nalawade

    I would challenge the requirement and try to stay with the default user picker component. But you can implement your own picker using the custom picker component.

  • I agree with Stefan, the Custom Picker Component is very customizable, we use it in a number of locations for different requirements.  It is used for our primary shared user picker also to provide extra details and formatting, etc.  We almost never implement a!pickerFieldUsers().

  • 0
    Certified Lead Developer
    in reply to vaibhav.nalawade

    I've built this using a Custom Picker field before, out of bare necessity.  There are many pros and cons.  Just off the top of my head...

    Pros:

    1. assuming you already have a "users" DB table in your application (which I always recommend anyway), you get a lot of extra inherent flexibility, for example...
    2. you can set it to allow selection of deactivated users - especially useful if there are any admins / managers who need to pull tasks still assigned to users who've left your organization, since the OOB user picker is frustratingly useless for this use case
    3. you can incorporate your own DB elements (if necessary) into the search - in my current system, for example, the user's PK ID is exposed to the end users as the "person ID" and used referentially.  (I may have designed this a little differently myself, but it was given to me this way, and it's not bad overall).  In other words, I can type parts of someone's name, username, and/or their Person ID into my custom picker field and it'll pull that person.
    4. you have full control over formatting of the selection text (as in the plaintext it displays; it can't use Rich Text unfortunately).  For example, "Firstname Lastname (username) [PersonId]"
    5. you can have the selected entries function as links to items in the accompanying record (especially useful when you have a custom record type set up for your perosnnel data)

    Cons:

    1. maybe a tad slower than the OOB user picker (though i haven't extensively tested this lately)
    2. useless for any Appian accounts not explicitly stored in the DB
    3. if you need to use "group filter" functionality, it gets quite a bit slower and/or more tricky to implement
    4. there's no way to mimic the nice "user picture card" thing you get in the OOB user picker
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Stefan, thank you so much for you help