Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Update many-to-many relationship by combobox inside gallery

(0) ShareShare
ReportReport
Posted on by 202

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:

carl1to_0-1657025969957.png

 

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.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics