M2M Cascading Filter for Dashboard Report

Xuchun Lin1
Tera Contributor

We ran an issue on M2M Cascading Filter creating.

 

Let us say, we have a table to record user's activity,  the table  has the column of User  but doesn't have the column of group, An user belongs to Multiple groups while a group has multiple users, this is M2M relationship. We create a report grouping by the user, and we create a  cascading filter on the dashboard to let  end user to select group and user. We created a view to join this table with sys_user_grmember, and create the  cascading filter  based on that. The result is the report works for individual user, however, for the group, when  we select all for User after picking the Group name, all the users' info coming out, even the user doesn't belong to the group.

 

Could someone help on this issue? 

 

Many Thanks,

X Lin

4 REPLIES 4

Anshu_Anand_
Kilo Sage
Kilo Sage

It sounds like you're encountering an issue with your cascading filter on your ServiceNow dashboard. Specifically, when a user selects a group in the filter, all users are appearing in the report, even if they don't belong to that group.

One possible solution could be to modify the view you've created to join the user activity table with the sys_user_grmember table, to include a filter that only includes users that belong to the selected group. This way, when a group is selected in the cascading filter, only the users that belong to that group will be displayed in the report.

Another option could be to check the join conditions between tables, specifically check if you are using an outer join instead of inner join. Inner join will only give records that match the condition and eliminates the unwanted records in your report.

It would also be helpful to check the data in the sys_user_grmember table to ensure that the group and user associations are being recorded correctly.

 

Hope its helpful

Regards,
Anshu

Thanks Anshu for your help.

What we need is to create reports for different groups, so your suggestion "only includes users that belong to the selected group."  is not enough,  there are several select groups. Under current condition, when we pick the "select group", and pick "All" for the User, all users' info (including users in other group)  come out.

Thanks again,

Xuchun

@Xuchun Lin1 

 It seems you have used table in last lavel of cascading filter , so this is happening.

I wil suggest you to go to edit of cascading filter -> open group one, go to related list and 2nd tab says about mention table, there you have to add table and have to map field of table.

So this will work even a user has just selected group.

Hope this will help you.

I tried those things. It might be a bug for ServiceNow to generate  interactive filter (M2M, user, group)