Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Report showing users in one group that are not in two other groups. DB view self-join?
Post Flair (click to view more posts with a particular flair)
Post Body

Hi all!

I need to write a report where I can get all users who are part of grp A but not part of grp B and not part of grp C

Scenario:
Grp A = reply required
Grp B = answered Yes
Grp C = answered No

Option 1: My original thought was to do a join where my columns are:
user_id
grp A
grp B
grp C

Where the grp columns would either display the grp name or be empty. Then I can run all my reports off of this DB view.

Option 2: I can easily write a script to get the data, but prefer to not jump through the hoops of creating a UI page and fiddling with jelly to be able to add a pretty report on a dashboard.

Option 3: Build out a table for the data (boss tossed this one out there). Def doable, but for ~200 users for the current ask, well, it feels like overkill.

Are there other solutions? Has anyone done a similar self join? I have not been able to get the DB view to even simply display all users in one group. Admittedly, I did not add the user table to the view first, I was just trying to limit what came from the grpmember table.

At any rate, any insights or suggestions would be much appreciated!

Edit: For anyone who doesn't want to read the comments, I ended up writing a script include to compare two glide lists from sys_user_gpmember. This generated a comma separated list of sys_ids from the sys_user table. I dropped a call to the script include in the condition builder on sys_user for "sys_id is one of <javascript: new GroupTracking().noReply()>

They wanted additional breakdowns, so I added other functions in the same script include to generate additional reports. Thank you to those who replied and gave me the insight I needed to make this work.

Author
Account Strength
100%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
10,407
Link Karma
3,486
Comment Karma
6,707
Profile updated: 4 days ago
Posts updated: 10 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago