Announcements
I have two galleries connected to two dataverse tables. Gallery1 has items that get patched into Gallery2 and that works just fine. When I try to filter out Gallery2 items from Gallery 1 to prevent duplicate additions, I found that this code: Filter('Datatable', Name <> Gallery3.Selected.Name) works to remove whatever is selected in Gallery2, but won't work when looking at AllItems. Error says it can't compare text to a record but whenever I try to tweak the formula it breaks further. Any helps is greatly appreciated!
@BryantY
Please consider changing your Formula to the following:
Filter('Datatable', Name <> Gallery3.AllItems.Name)
Now, that said..you mentioned Gallery1 and Gallery2 in your post, but only Gallery3 is seen in your formula.
Hopefully this will provide enough to get you going, but if not, please describe more of the scenario.
@RandyHayes
The two galleries I'm using are named Gallery2 and Gallery3 the first gallery being on a different page with a different function. "Name <> Gallery3.AllItems.Name" gives the error "Incompatible types for comparison. These types can't be compared: Text, Table". The name column for Gallery3 is a lookup column from when we initially set it all up. Would that be what's causing the hiccup?
Oops...sorry I forgot to change the most important part from your formula (I got so focused on where is this Gallery3 coming from!!).
The formula should be:
Filter('Datatable', !(Name in Gallery3.AllItems.Name))
@RandyHayes I ended up changing the lookup column to a text column since it was getting its value from the patch and applied your formula above. It fixes the errors, but it doesn't show any data in Gallery2. Any thoughts?
I'm a little confused on all the galleries.
Can you provide the Items properties for each one?
@RandyHayes Gallery2 holds line items used to create a contract set up. each row has an "add" button that patches it into Gallery3 and associates that line item with that company. Once that item is added though we're trying to take it out of Gallery2 so the likelihood of duplicates is null. It was able to remove one row being the selected row at the beginning of this. My goal was to filter the data going into Gallery2 so as Gallery3 filled up the options used would be taken out.
Gallery2: Filter('Datatable1', !(Name in Gallery3.AllItems.'Item Name'))
Gallery3: Filter('Datatable2', Contract.Name = Text(DataCardValue37))
I was able to get the function working! Your solution worked for filtering the gallery contents, but the app wasn't able to compare the two so I added a collection for the actual comparison and it's doing its job! Thank you so much!!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 409 Super User 2026 Season 2
Mohsin Ali 328
WarrenBelz 252 Most Valuable Professional