1 of 1 people found this helpful
have a look at the filters in the Query and Report Designer, I believe that the filters you are looking for, are already there.
But if not, here is an example for filtering users by group and vice versa (both filters are used in my Add Assignment Action):
First, in the Object Designer, go to the user attribute, you like to filter by the selected group and add a new filter that looks like in the following screenshot.
Second, set the filter for the Groups:
Do not forget to set the Filter Rule Conditions! In the Filter Selectors for the user, select Group is not Null and for the Group that the User is not Null.
So the filters will show all users and groups as long as both attributes are not populated.
Have a try and let us know if and how you get along with the filters.
thanks for the quick reply!
Yeah I have something similar in other modules but trying to replicate it into a new object called Assign within Group. Within this we have made a relationship between Analyst and Group.
Here is the two queries and also the conditions can you see anything potentially needing changed?
are you trying to only allow your Analysts to assign within their own Support Groups? I'm not entirely sure, what it is that you're trying to do with the filters... Have you experienced any problems with your configuration?
If you try to explain the use case, maybe I can set you on the right track.
OK so the scenario is that we are trying to limit the support groups shown to the predefined ones.
Second scenario is the link between the Group and the Analyst attributes via the filters and conditions so only the Analysts which are part of the selected Group appear.
I know the name of the Business Object may have thrown you (assign within group), please ignore.
Ah, now I think I understand your case.
I just took a closer look at your filters and I think you'll have to use some other criteria in both filters:
Take a look at my screenshots and just exchange my _AssignmentGroup and _AssignmentUser with your Group and User attribute in your filters. Then your filters should work.
Thanks Andreas, but as I thought under my business object using the attributes of Group or Analyst I'm not sure what else I can select other than Title.
That would be the correct attribute to use. Just for basic understanding:
Users are members of one or more groups and one group can have one or more members. That is reflected by the object UserGroups (technically speaking this is a many-to-many relation in the database). Now, on each side in the object User and Group there is an attribute also called UserGroups. And there you will find the value(s) for your filter.
If you want to select only users that are a member of the selected group, you add a filter to the user attribute. The filter need all members of your group and you'll find them in the Group\UserGroups\User. Since you cannot compare DataObjects to each other, you need to select an attribute to do the trick. The easiest one will be the Title (although I'm sure the Name attribute would work too). So you get the Group\UserGroups\User\Title, that will return all members of the selected group to your filter.
The same system applies to the filter on the group attribute, if you only want to select groups, the chosen user is a member of. You add the filter to the group attribute and you'll need all groups the user is a member of. So we take a look at the same spot, but in the user instead of the group. The needed criteria is the User\UserGroups\Group and as before we need an attribute - Title. So User\UserGroups\Group\Title will return all groups title the user is a member of.
I don't have UserGroups within the Filter of Group. Adding Title is Equal to Group, here is the following available attributes:
Assign Task Collection
Child Groups collection
Last Update By
Noticeboard Items collection
Where do you add the Users to the Groups?
It seems to be the Users Collection then...
I hope you are well!
So this is standard practice for us. So when we want to filter group by user and vice versa we create the following filters
Title (Sort Ascending)
Users.User = Runtime Value of Analyst (Where Analyst is the name of the user object on your Assignment object)&
Group Type = Support Group
Title (Sort Ascending)
Groups.Group = Runtime Value of Group (Where Group is the name of your groub object on your Assignment object)&
User Type = Analyst
Does that make sense?
Thanks to you both, JSR that worked a treat.