Hello, 1. I created a constant of type Group that has the value of al

Hello,

1. I created a constant of type Group that has the value of all active users in our company.
2. I created a rule to extract the username of all active users.
=joinarray(getdistinctusers(topeople(cons!active_user)),char(13)&char(10))
3 - I run this rule in a script and the list is saved in a text variable (multiple) and then sent to an excel spreadsheet.

I also got another rule to fetch the username of deactivated users.
=joinarray(getdeactivatedusersby("username","",2),char(13)&char(10))

How do I get the First Name, Last Name for my deactivated/active users? I've looked on the Forum for different solution but wasn't able to apply.

Thanks

OriginalPostID-150384

OriginalPostID-150384

  Discussion posts and replies are publicly visible

Parents
  • @mjmallet We need to put in the load(). Here goes your snippet after applying the context:
    load(
    local!users: getdeactivatedusersby(
    "username",
    "",
    2
    ),
    local!usersWithNames: apply(
    rule!fetchUsersWithFirstAndLastName(_),
    local!users
    ),
    local!usersWithNames
    )

    If you are new to using load() or with(), I would like to suggest going through https://forum.appian.com/suite/help/7.9/Evaluation_Functions.html.

    Confirming the above, documentation conveys the same - 'When you don't specify the local! domain, the system first matches your variables with rules or constants with the same name, then looks for local variables with the name. Appian recommends that you always use the local! domain when referring to local variables.'
Reply
  • @mjmallet We need to put in the load(). Here goes your snippet after applying the context:
    load(
    local!users: getdeactivatedusersby(
    "username",
    "",
    2
    ),
    local!usersWithNames: apply(
    rule!fetchUsersWithFirstAndLastName(_),
    local!users
    ),
    local!usersWithNames
    )

    If you are new to using load() or with(), I would like to suggest going through https://forum.appian.com/suite/help/7.9/Evaluation_Functions.html.

    Confirming the above, documentation conveys the same - 'When you don't specify the local! domain, the system first matches your variables with rules or constants with the same name, then looks for local variables with the name. Appian recommends that you always use the local! domain when referring to local variables.'
Children
No Data