cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sjcitpro
Helper III
Helper III

Showing items in Gallery based on values from another Gallery.

I have a Gallery named GalleryPositions with items from Sharepoint list "Staffing List" I have another Gallery on same screen names GalleryCandidates with items from Sharepoint list Candidate. "Staffing List" has a column named CandidateIDs that contain the ID's of Candidate delimited by spaces. "10 34 40" I can use the following: Filter(Candidate, ID in Split(GalleryPositions.Selected.CandidateIDs, " ")) to show those Candidate list items where ID's in "Staffing List":CandidateIDs in Gallery GalleryCandidates. What I want to do is show the remaining items in the Sharepoint list Candidate. So I have a list named "Staffing List" and a list named Candidate. An item in "Staffing List" can have multiple Candidate list items attached. I want Gallery GalleryCandidates to show those list items that are attached to GalleryPosition.Selected then the remaining Candidate list items.
2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @sjcitpro,

Could you please share a bit more about your scenario?
Do you want to display the remaining Candidate list items which are not attached to the selected item in GalleryPosition gallery?

If you want to display the remaining Candidate list items which are not attached to the selected item in GalleryPosition gallery, I think the Not function could achieve your needs.

I have made a test on my side, please take a try with the following formula (set the Items property of the Gallery to following😞

Filter(
Candidate,
Not(ID in Split(GalleryPositions.Selected.CandidateIDs, " "))
)

More details about the Not function in PowerApps, please check the following article:

Not function

 

Best regards,

Kris

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

I would like to show the attached items first, then the remaining items.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (90,129)