Hi Everyone,
if(
rimod1 = 2,
{cons!member1,cons!member2),{}
)
In the above code I try to get the value from 2 constant which contain group member, but I am getting value from member1 not from member2.
can anyone help me on this.
Discussion posts and replies are publicly visible
Does that code snippet work or not. It cannot work and also throw an error. More details please.
I have tried the above code in expression rule and I am able to get all the value. When I am using the above code in Interface that time it is throwing error i.e "Could not cast user to group"
More details please! What do you try to do?
[assuming they're still trying to use a!pickerFieldGroups(), though i'm unclear on how or why.]
I am using a!pickerFieldUsers() in interface, where I am trying to get values from two constant which contains groups. I want to display all the value present in two groups and from that only user can select only one user.
a!pickerFieldUsers( maxSelections: 1, groupFilter: if( ri!pnrNo =2, {cons!member1,cons!member2},{} ))
as Stefan pointed out, the groupFilter parameter only accepts a single group input. If you want to allow your User Picker to access users from both groups, then you'll need to create a parent group with both of those groups as members, and point the picker field at that parent group instead. (You can wrap it in the same if() logic to check for the value of ri!pnrNo if you like).
I still do not understand why you try to use a user picker field to display users. While possible this does not make a great UI.
Have a look at the below pattern and replace the code in line 7 with the working code i posted.
docs.appian.com/.../user-list-pattern.html
Unknown said:why you try to use a user picker field to display users
Consider that he might just be trying to ["see"] a certain set of users in the picker field, in the sense of the standard use case for the user picker field. That's my reading here.
To me this sounds like a great case for a!dropdownField() populated from 2 groups, with it's built-in search capability. Assuming the use case is #1, which is not yet clear here.
1) Select a single user from a list of users who are in one of 2 groups
2) Select a group (hence the pickerFieldGroups?), but have the members on display in a component nearby?
yes you are right Mike Schmitt