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
Can you describe which outputs you get for your inputs?
I would expect that for ri!mod1 = 2 you get a list of groups. And empty list for any other value.
yes right empty list for other value, but I am able to get the value from cons!member1 .
Here I try to get get value from both cons!member1 & cons!member2 if ri!mod=2.
OK, can you post a screenshot?
I assume that your constants are both of type Group. Now what do you expect as the output? The users being member of these groups? If this is the case, use the following function get them.
docs.appian.com/.../fnc_people_getdistinctusers.html
a!pickerFieldGroups( label: "TEST", groupFilter: if( ri!mod1 = 2, {cons!member1, cons!member2},{} ))
this is the code, where I am getting only member1 value.
You saw that this field only accepts a single group as filter?
Here I want to display member from both the group, as of now it is showing only member belongs to member 1 only.
Do you want to display the members of both groups, or do you want to select users from both groups?
As I already wrote, this field only accepts a SINGLE group.
I want to display the members of both groups. How to do it ?
I already mentioned the getdistinctusers() function above. Try something like this:
a!forEach( items: getdistinctusers({cons!EOM_GROUP_ADMINS, cons!EOM_GROUP_GLOBAL_RISK}), expression: concat( user(fv!item, "firstName"), " ", user(fv!item, "lastName") ) )
The above code is working and able to get the all the value from both the constant, but it is throwing Cast Invalid error "Could not cast user to group".