I would like to update an m:n relationship between two dataverse tables in a canvas app that gets imported in a model-driven app.
I use a combobox inside a gallery to display and set the m:n relationship.
Gallery: (filtered through the combobox cbAnswerSheet)
Items: Filter(Answer, AnswerSheet.new_answersheetid = cbAnswerSeheet.Selected.new_Answersheet.new_answersheetid)
Inside the gallery is a combobox that should update the m:n relationship:
Items: Filter(Choice, Question.'Question(new_questionid)' = ThisItem.Question.'Question(new_questionid)')
DefaultSelectedItems: ThisItem.Choices
Answer and Choices both have a lookup to Question.
I'm looking for the function to relate and unrelate the selected items in the combobox with the "ThisItem" of the gallery. Something like:
OnChange:
ForAll(Items, If(item in selection, Relate(item, ThisItem.Choice), Unrelate(item, ThisItem.Choice)
How do you do this?
Data Model:
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1