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
3 replies
Subscribers
9 subscribers
Views
2539 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi everyone, I would like to get the current username and use this va
tiagos
over 9 years ago
Hi everyone,
I would like to get the current username and use this variable in my SAIL form, this is possible? And how I can get it?
I had already used "loggedInUser()" but this returns "Administrator" and I want something like "tisoares"...
Thanks in advance.
OriginalPostID-195176
OriginalPostID-195176
Discussion posts and replies are publicly visible
0
sonalk
over 9 years ago
Hi Tiago,
You can capture the process initiator in a user type process variable(for example processInitiator_user >> value to store in it is pp!initiator) and pass on the same as parameter configuration to the SAIL form, also if required you can add a check as mentioned below :
if(loggedInUser()=pv!processInitiator_user ,loggedInUser(), pv!processInitiator_user )
Hope it helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Additional information:
Per the documentation
forum.appian.com/.../Scripting_Functions.html
- If there is no user context, such as when used in an expression in a node output, loggedInUser() returns "Administrator".
- In non-SAIL task forms that do not follow an activity-chained flow, loggedInUser() can be populated by selecting the Refresh default values every time the task form is viewed checkbox on the Other tab of the activity. The checkbox does not need to be selected when a SAIL form is used as it is automatically applied.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
tiagos
over 9 years ago
Thank you all! It works perfectly!!
Now I understand the usage of loggedInUser() according to different contexts, this actually was my problem...
Thanks for help guys!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel