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
  • 0
    Certified Lead Developer

    The standard user picker field does not support this level of customization.

    What do you mean with "how to display all the users using user picker field"? What is "all users"? A picker field is made to select certain users.

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    here all users means users in appian.

    so I need to create a custom picker with users coming from database, Is this right?

  • 0
    Certified Lead Developer
    in reply to vaibhav.nalawade

    Why database? Users are not stored in the DB.

    A user picker lets you select from all users by default. But it defaults to display first and last name.

    Can you explain your use case a bit? I do not understand what you try to achieve.

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    so my exact requirement is to display user list in user picker in format of lastname + firstname in alphabetical order. there is any way other than user picker?

  • 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
Reply
  • 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
Children