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
7 subscribers
Views
3143 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi, I am trying to render a dropdown from a constant of type group (List) using
Karthik
over 8 years ago
Hi, I am trying to render a dropdown from a constant of type group (List) using the below code. It works fine if a user is administrator and it throws "Expression evaluation error in rule 'rule1' at function 'apply' [line 253]: Invalid function group" when the user is just a viewer.
SAIL Code:
a!dropdownField(
label: "Business Group to Work",
choiceLabels: apply(
group(
_,
"groupName"
),
cons!GROUPS_TO_WORK
),
placeholderLabel: "--Select--",
choiceValues: cons!GROUPS_TO_WORK,
value: ri!groupToAssign,
saveInto: ri!groupToAssign,
required: true,
requiredMessage: "Please select a group to assign the task"
)
Constant Details:
Name: GROUPS_TO_WORK
Type : Group
List: Yes
Values : Approvers; Reviewers; Admins
Please help me in resolving this issue.
OriginalPostID-171177
OriginalPostID-171177
Discussion posts and replies are publicly visible
Parents
0
manisht
over 8 years ago
Hi Sikhivahans,
yes you are right this is for process context, I am wondering what can be the scenario where we need a dropdown to represent groups on a report or a dashboard. If it's not a dropdown and is required only for display we should use groupnames (Text).
In any case if it is outside the processcontext and a dropdown is required, we can configure the rules to use getgroupbyname() and pass the text array of names, it returns null where user doesn't have proper rights on groups and we can process the o/p to remove the nulls.
This way user can still see all the groups he has proper access to without ending into above mentioned exception.
Opening the group security to all users will defeat the purpose of applying the group security at the first place itself.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
manisht
over 8 years ago
Hi Sikhivahans,
yes you are right this is for process context, I am wondering what can be the scenario where we need a dropdown to represent groups on a report or a dashboard. If it's not a dropdown and is required only for display we should use groupnames (Text).
In any case if it is outside the processcontext and a dropdown is required, we can configure the rules to use getgroupbyname() and pass the text array of names, it returns null where user doesn't have proper rights on groups and we can process the o/p to remove the nulls.
This way user can still see all the groups he has proper access to without ending into above mentioned exception.
Opening the group security to all users will defeat the purpose of applying the group security at the first place itself.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data