How can I get the list of active and inactive users without using any plugin?
Discussion posts and replies are publicly visible
I'm not sure this is generally possible without the use of a plug-in. Can you share what use case you have that requires you to not use any plug-ins?
A list of all users is simple. Create a group and add all users via a membership rule. Then query that group using a!groupMembers().
No OOTB solution for the inactive users.
There's actually an already existing group called "All Users" that does exactly what Stefan said. It uses a rule to gather every user in the system to itself.
I don't know if this still holds true, but in the past users were flagged inactive by being placed in an "Inactive Users" group that you could find, though I can't seem to find it now.
Handy little snippet for finding all of your group IDs:
a!forEach( items: enumerate(300), expression: try( concat(fv!item, " - ", group(fv!item, "groupName")), "That's not a group" ))
You shouldn't try using try() for anything that ever might make it to production, but for your own investigation in /rule that you're going to throw away in minutes, I say knock yourself out.
I think you should be careful when suggesting brute-force "solutions" that also include calls to internal API and unsupported functions.
is there any documentation for try()?
No! It is an internal only function. Do not use it as it could change any time without notice!
interesting.I was not aware that there is a set of "internal only" functions, but it makes sense.Just tried it in my personal sandbox and i think i got the basic idea, but yeah. We should avoid them.
Please bear in mind the part I said about it being "for your own research" and "thrown away in minutes". I'd never SAVE a rule with try() in it. I'd just test one and record the output for my notes. If you create it in /rule and just leave, then it vanishes without an object being created.
That's what I would want after getting this info. Granted, you'd have to recreate the rule every time you want to do this, but you should only want to once. Aside from the internal groups listed the first (and only?) time you run it, you'd just click on the group you wanted to know about (because you created it and it's clickable) and go to the properties.
That's what I read. It's just that there are people who just start doing it and then complain that it doesn't work anymore. That's why I always point out how I did it.
Unknown said:I was not aware that there is a set of "internal only" functions
in Appian we refer to these as Undocumented Functions - including, among others i'm forgetting, try(), sort(), e**l(), and even "lambda function who shall not be named"... once upon a time, whereContains() was also undocumented, but they eventually added it officially. I understand why they won't add some of these, though I kinda wish they'd officially add try().