cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Find conjunction of two lists

Hi guys,

 

I have a situation where we use the Office365Groups... in this example its related to MS TEAMS. Our users can be members of all kind of groups that exist or create their own for their own purpose. There are however few (about 10) groups that are on a higher level and should cover a whole department (for example HR, IT, Sales, ...etc)... lets call them Department groups. 

When a user joins such group he can (within a SPO list ) choose a dropdown the list he wants to join ...I generate csv, powershell reads it and user gets in.

When user wants to leave, i am unable to show him the Department groups he is in. this command: Office365Groups.ListOwnedGroupsV2() can show you in which groups you are in, but i want to filter it for the Department groups... something like Distinct((Filter('Departments vs 365Group', "xy" exactin Title)),'Title') where xy would be replaced by "ListOwnedGroupsV2"... but somehow it wont work. any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Find conjunction of two lists

Hi @Sifu ,

Please try this:

Distinct(Filter('Departments vs 365Group',
                  Title exactin Office365Groups.ListOwnedGroupsV2().value.displayName 
                  ),'Title')

 Office365Groups.ListOwnedGroupsV2().value.displayName will return a table. You can not use "table in field" as filter condition.

You need to use "field in table".

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Power Participant
Power Participant

Re: Find conjunction of two lists

@Sifu 

 

Does it work if you try this:

 

Instead of

 

Office365Groups.ListOwnedGroupsV2() exactin Title 

 

Does it work if you try something along the lines of:

 

Office365Groups.ListOwnedGroupsV2().value.displayName exactin Title 

 

The above idea may actually need to be in context of the evaluation of each individual record of a table though and changed a little bit, so the above is just a starting point.

Highlighted
Resolver II
Resolver II

Re: Find conjunction of two lists

Hi @dynamicsedge , thanks for input,

so the function: Office365Groups.ListOwnedGroupsV2()

my list of department groups: Departments vs 365Group

 

and the formula: 

Distinct((Filter('Departments vs 365Group', Office365Groups.ListOwnedGroupsV2().value.displayName exactin Title)),'Title')

 

is not working, wont show anything

Highlighted
Power Participant
Power Participant

Re: Find conjunction of two lists

@Sifu 

 

It was not intended to be used literally like that, for an exact literal working example for your case, we don't have it now but if we have it later we might reply here.

Community Support
Community Support

Re: Find conjunction of two lists

Hi @Sifu ,

Please try this:

Distinct(Filter('Departments vs 365Group',
                  Title exactin Office365Groups.ListOwnedGroupsV2().value.displayName 
                  ),'Title')

 Office365Groups.ListOwnedGroupsV2().value.displayName will return a table. You can not use "table in field" as filter condition.

You need to use "field in table".

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Resolver II
Resolver II

Re: Find conjunction of two lists

@v-yutliu-msft  works totally well! Superb job, thaaaaaanks a  loooot!

Highlighted
Resolver II
Resolver II

Re: Find conjunction of two lists

@v-yutliu-msft one more question, i noticed that other users are not able to get anything in this drop down, only me...

Distinct(Filter('Departments vs 365Group',
Title exactin Office365Groups.ListOwnedGroupsV2().value.displayName
),Title)

 

if i place additional dropdown in the form with Distinct(('Departments vs 365Group'),Title)

or Office365Groups.ListOwnedGroupsV2().value.displayName,  they get results in both, but if I combine them, its only me who gets results

 

EDIT: i just realized that its only showing groups where you are owner hence if the user is not an owner of a group theres no intersection... 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,955)