Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
9 subscribers
Views
4359 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Appian function isuseractive
ankitb0003
over 8 years ago
Hi,
We are using Appian 16.1 and I have noticed that isuseractive function is taking longer time to execute and it’s creating a performance issue.
Do we have any alternative function for isuseractive or any work around?
-Ankit
OriginalPostID-231122
Discussion posts and replies are publicly visible
0
Josh
Certified Lead Developer
over 8 years ago
You can try using the built in user() function. User(appianUser, "status") returns 1 for active and 0 for deactivated.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitb0003
over 8 years ago
Thanks.
Yes I have tried using this function. But it don't work when user is deactivated or user id is wrong. It throw an invalid user exception. but the isuseractive worked fine in that case stating user is not active or not available.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
abhi.jana
Appian Employee
over 8 years ago
What about isusernametaken()?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
abhi.jana
Appian Employee
over 8 years ago
if(isusernametaken(ri!user),user(ri!user,"status"),"User does not exist")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkateshs329
over 8 years ago
#ankitb: Please try below code it might helpful to you.
if(user(ri!username,"status")=1,"UserActive","UserDeactivte")
Note;ri!username type is user.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitb0003
over 8 years ago
Thanks All, isusernametaken worked for me, its much faster then isuseractive.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel