I have two collections I want to compare so I can ensure they match exactly. Here are samples of the two collections:
Collection1
ID | Item |
3 | C |
Collection2
ID | Item |
1 | A |
2 | B |
3 | C |
How can I write my ForAll( RemoveIf ) so it removes IDs 1 and 2 from Collection2 because they are missing from Collection1?
Hi @pwrappr01 ,
I dont't think you need the ForAll in this case. The RemoveIf already allows you to loop through a table.
Why not do?:
RemoveIf(Collection2, Not(ID in Collection1.ID))
Hi @pwrappr01 !
You dont need to use ForAll since RemoveIf loops through all lines anyway. Try this formula:
RemoveIf(
Collection2,
CountRows(
Filter(
Collection1,
Id = Collection2[@Id] && Item = Collection2[@Item]
)
) < 1
)
BR
Pontus
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
206 | |
187 | |
70 | |
37 | |
34 |
User | Count |
---|---|
348 | |
268 | |
122 | |
78 | |
59 |