Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Toggle Control on a Gallery fires "onCheck - event" when the Gallery is reloaded - CheckBox works fine! Is this a bug?

(0) ShareShare
ReportReport
Posted on by

I want to make "m:m selection pattern" between two records in a CDS data source in a Canvas App using two galleries.

 

When selecting a record in the first gallery, the second gallery is loaded with "all relevant records" and using a toggle, the m:m is either true (if an exiting m:m exists) or false (if no m:m exist). This works fine and I can now relate or unrelate by switching the toggle.

 

Sometime the number of rows in the second gallery is large, and I added a filter on the second gallery to make selection easier. I now find some inconsistencies when filtering. Most of the time it works, but sometimes if I filter so the first record is true, and after that I do a new filter so the first row is false, it will fire the onCheck event (and never the onUncheck???) and set it to true. Sometimes only for the first row, but sometimes for all rows. This is really weird. I tried using the exact same events/formulas on a CheckBox and it works flawlessly.

 

I have made a recording of the issue. In the app I have made a toggle, that disables/enables the toggle in the gallery, so first I show that I cant trigger the error with checkbox, but the error comes with the Toggle.

 

The formulas used on both CheckBox and Toggle are:

default: !IsBlank(LookUp(selectedOrgTeam.SecurityGroups, SecurityGroup = ThisItem.SecurityGroup, SecurityGroup))

onCheck: If(boolUseToggle, Relate(selectedOrgTeam.SecurityGroups, ThisItem);Set(selectedOrgTeam, selectedOrgTeam), false)

onUnCheck: Unrelate(selectedOrgTeam.SecurityGroups, ThisItem);Set(selectedOrgTeam, selectedOrgTeam)

 

I have tried to completely rewrite the logic, so all galleries are based on collections in stead of the CDS data source, and then do all the true/false logic in the collection, to have full control of "loading sequence", but the error is still occurring.

 

Any ideas what to do?

 

@HemantG thanks for pointing me to this forum, although this is not really a "pro dev" issue. 🙂

 

 

 

 

 

 

  • Community Power Platform Member Profile Picture
    on at
    Re: Toggle Control on a Gallery fires "onCheck - event" when the Gallery is reloaded - CheckBox works fine! Is this a bug?

    the solution (two custom entities with m:m) and the canvas app. If anyone want to try to reproduce.

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 - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 109 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 72

Overall leaderboard