Tools
Sign in
Login
Forum
How do I convert user Roles (set) to Indexed String?
Forum
>
Scripting
>
How do I convert user Roles (set) to Indexed String?
n/A
posted
on June 23, 2014
at 6:39 PM
n/A
posted
on June 23, 2014
at 6:39 PM
n/A
replied
on June 24, 2014
at 9:46 AM
n/A
replied
on June 24, 2014
at 9:46 AM
You can use the function:
1
ToIndexed($user.getRoles(), String)
If you need use the function above I suggest you to define at least a GetRoles(User $user) function like the following:
1
Function GetRoles(User $user) : Indexed String Begin
2
If $user != null Then
3
Return ToIndexed($user.getRoles(), String);
4
Else
5
Return null;
6
End
7
End
So all the usages will always refer to the same business object. I will create a feature request to add the function above is added to the next version of the FunctionsExtension so it will be possible to grant compatibility with future Appway releases without affecting the solution you built.
If you need the roles of the current user I suggest you to use instead:
1
USERROLES()
which is already implemented in the Appway core.
n/A
replied
on June 24, 2014
at 8:01 PM
n/A
replied
on June 24, 2014
at 8:01 PM
Thank you!
Please
sign in
to add a reply
About this site
|
Terms of use
|
Privacy statement
|
Contact us
© 2025 Appway AG. All Rights Reserved.