I am making first essays with Power Apps and may therefore have a completely wrong approach here.
Summary:
I have a model based app based on a dataverse table named "Contacts".
This gives me a selection Ribbon on the left side called "RecordsGallery1", and I can edit the fields in "Form1".
I have another table called "Addresses" and want to create an m:n relationship between Contacts and Adresses, so that the Addresses related to a specific Contact appear in another gallery (AddressGallery) (outside of Form 1).
For this, I created a third table Contacts_to_Addresses, with a lookup field to Addresses and and Contacts, each, and a third field for some Metainformation regarding the type of address in the contact (billing, mailing, visiting etc.).
First question:
I am trying to select the corresponding records for the "AddressGallery" in the Items property as follows:
Filter(Contacts_to_Addresses,ContactLookup=RecordsGallery1.Selected)
And it gives me the following error:
"Incompatible types for comparision. These items can't be compared: Record, Record"
I have tried a lot of other stuff, but cannot get it to work.
Any general suggestions?
The other question:
This is probably a general comprehension issue of dataverse tables:
In principle I would need something like a primary key to compare the two, but I cannot find it.
I can define a primary column in a table, but that does not need to be unique. Is there something fundamental I am missing, here?
If it was there, I could easily use it for the comparison