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
4 replies
Subscribers
4 subscribers
Views
2459 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
How to retrieve user regional settings like language/time zone/calender
abhinavg
over 8 years ago
How to retrieve user regional settings like language/time zone/calender
user() does not have the regional propertiescurrently & usertimezone() - If the application is configured to override user preferences, returns the site primary timezone
Thanks,
Abhinav
OriginalPostID-166567
OriginalPostID-166567
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 8 years ago
Out of the box we only have these two:
forum.appian.com/.../Scripting_Functions.html
forum.appian.com/.../Scripting_Functions.html
If you have enabled "Override user preferences" they'll return the site default settings. That's the expected behavior. At this point you can't retrieve their preferences because by default they are changed to use the default ones. This can even be seen if the user tries to change her preference, she won't be able to do so and it will display the default ones.
If you want to retrieve the user's actual preferences you'll need to create your own custom function:
ServiceContext sc_ = ServiceContextFactory.getServiceContext(username);
UserProfileService usps = ServiceLocator.getUserProfileService(sc_);
UserPreferences upreferencs = usps.getUserPreferences();
return upreferencs.getLocale();
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
abhinavg
over 8 years ago
Thanks Eduardo..
Can you generate and enhancement request for same
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
The enhancement has been created. Thank you for your feedback on the product.
Eduardo Fuentes
Appian Cloud and Community Services
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
Would you mind explaining the use case for this enhancement request? I'm interested in why you need the selected preference for the end user if that won't be taken into account at all due to "Override user preferences".
Basically whatever they selected in the past becomes irrelevant in terms of use because those settings are ignored due to the "Override user preferences flag"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel