Skip to main content
Inspiring
Nov 18, 2022 5:30 AM UTC
Solved

Get All basic users

Hi,

Is there any function or a recipe to get all the basic users. Please help

    stefanhelzle0001
    Brainy
    Nov 21, 2022 8:34 AM UTC

    I think the most simple approach is, to create a group and add a membership rule: "Add users whose User Type is not Administrator". Then you can just fetch its members using a!groupMembers().

    11 replies

    Known Participant
    Nov 18, 2022 6:42 AM UTC
    Inspiring
    Nov 21, 2022 5:47 AM UTC

    Hi Sairam, 

    Can you please help how to get all the basic users with the user(). 

    harshitb6843
    Brainy
    Nov 21, 2022 5:48 AM UTC

    user() function is used to access properties of a user like firstName, lastName, email etc.

    vinays024987
    Inspiring
    Nov 21, 2022 6:09 AM UTC

    Hi @pavitra,

    You can retrieve the list of all users and then eliminate the users with role of system administrator, If that is what you are looking for. 

    a!forEach(
    items: getallusers(
    1,-1
    ),
    expression: if(isusersystemadministrator(fv!item),{},fv!item)
    )

    Inspiring
    Nov 21, 2022 6:25 AM UTC

    You can use the getallusers() function to get users and user() function to manipulate it.

    ashokm0006
    New Participant
    Nov 21, 2022 7:50 AM UTC

    how can i hepl you

    Known Participant
    Nov 21, 2022 8:07 AM UTC

    https://docs.appian.com/suite/help/22.4/fnc_people_a_groupmembers.html

    a!groupMembers(group: ri!group,memberType: "USER")

    and use rule input type as group then u can get users from it

    stefanhelzle0001
    Brainy
    Nov 21, 2022 8:34 AM UTC

    I think the most simple approach is, to create a group and add a membership rule: "Add users whose User Type is not Administrator". Then you can just fetch its members using a!groupMembers().

    Known Participant
    Nov 21, 2022 8:59 AM UTC

    yea...that is also actually work