Hi all,
I have two tables (Table1 and Table2) with many-to-many relationship and am displaying each table as a gallery and have a third gallery showing the records of Table2 that are related to the selected record of Table1. What I want to do is in the gallery of Table2 records, I only want to show the items that are NOT related, so that the user can "move" Table2 records between a "related" gallery and a "not yet related" gallery.
Gallery.Selected.Table2 to show related records is easy, but how do I do that opposite?
Working with canvas app and Dataverse for Teams as datasource.
Solved! Go to Solution.
Hello @cah2035 ,
You could use the following expression:
Filter( Table2, !(ID in Gallery.Selected.Table2.ID) )
ID being the unique identifier of the record.
Of course this could very easily cause a Delegation problem, so you might need to gather your Table2 records in a collection.
Let me know if this helps!
Hello @cah2035 ,
You could use the following expression:
Filter( Table2, !(ID in Gallery.Selected.Table2.ID) )
ID being the unique identifier of the record.
Of course this could very easily cause a Delegation problem, so you might need to gather your Table2 records in a collection.
Let me know if this helps!
@MichelKThank you!
It's true that I do get a delegation warning. Since I have using Dataverse as my data source though, and documentation says that Filter and Not are both delegable, I can just ignore that right? It won't matter for this instance anyway since I have only 20 or so records I am filtering, but just wondering.
@cah2035 it's true that Filter and Not are both delegable, however the in operator is not.
To work around the matter, there are multiple possibilities depending on your case.
In your case you're right that you don't need to worry about Delegation since you only have 20 records in the table.
If you have a specific use case that you need to discuss, I'll be happy to answer any questions.
User | Count |
---|---|
261 | |
128 | |
99 | |
48 | |
47 |