cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3csman
Impactful Individual
Impactful Individual

Toggle in Gallery Not Updating

I have a CombBox.

 

I have a Gallery. In the Gallery are Text Input and Toggle controls.

 

For testing purposes the Text Input field and one of the Toggle controls is collecting the same data - ThisItem.ECMem

 

The ECMem column a Text data type in the SP list.

 

When the ComboBox changes the Gallery updates and the Text Input data updates based on the Name in the ComboBox.

 

The Toggle control does not update. I do have Patch functions in the OnCheck and OnUnCheck properties of the Toggle. These function work and update the ECMem status if the Toggle is manually changed. 

 

How can I ensure the Toggle default matches the content of the SP column for the Member chosen in the ComboBox every time the ComboBox changes? 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Drrickryp
Super User II
Super User II

Hi @3csman 

A toggle can only be true or false.  It takes a little bit of coding to make it work.  Set the Default property to something like

 

If(ThisItem.somefield="aaa",true,false)

 

Likewise, make the Patch 

Patch(yourtable, ThisItem, {somefield:If(Toggle1,"aaa","bbb")})

View solution in original post

@3csman 

You could put the same Patch() in both check and uncheck.  I think it would work the same.  Try it and see.  

View solution in original post

4 REPLIES 4
Drrickryp
Super User II
Super User II

Hi @3csman 

A toggle can only be true or false.  It takes a little bit of coding to make it work.  Set the Default property to something like

 

If(ThisItem.somefield="aaa",true,false)

 

Likewise, make the Patch 

Patch(yourtable, ThisItem, {somefield:If(Toggle1,"aaa","bbb")})

View solution in original post

3csman
Impactful Individual
Impactful Individual

I'm using the OnCheck and OnUnCheck. Do I put the Patch in both? In the OnChange? Please advise.

 

@3csman 

You could put the same Patch() in both check and uncheck.  I think it would work the same.  Try it and see.  

View solution in original post

3csman
Impactful Individual
Impactful Individual

One recurring issue I'm having is the Gallery, the Toggle and the ComboBox all seems to reset to a default (screen OnVisible) state whenever the Toggle changes from state from true to false or back.

 

This is not desired, and I can't figure out how to stop it. The ComboBox content depends on a Dropdown on another screen. The ComboBox has the following default condition. Would this condition cause a screen reset because a Toggle changes?

 

Filter(MemberList, Park = ParkAlphaCmboBoxFld.Selected.Title)

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (55,769)