cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tonykiefer
Super User
Super User

Toggle Switch is not rendering on screen

I'm using a toggle and the switch does not render on screen.  The value is correct but the control isn't there.

 

Toggle Advanced Properties.jpg

 

tonykiefer_2-1636470270163.png

 The display mode is EDIT.

 

Is there a bug with this control or was there an update responsible for this?  I tried replacing this control and data card and I keep getting the same result.  The control works but the switch is not rendering.  

1 ACCEPTED SOLUTION

Accepted Solutions
tonykiefer
Super User
Super User

@PTBBSolutions 

 

I figured it out.  The display field for the data card was set to "View".  When I changed it to "Edit" the toggle switch rendered.

 

Thank you for helping me troubleshoot!

View solution in original post

6 REPLIES 6
PTBBSolutions
Solution Supplier
Solution Supplier

Hi @tonykiefer ,

 

I don't think there are any problems with the toggle control in general. Could you please advise what is 'currentRecord.ProdDevComplete' and how you are setting it?

tonykiefer
Super User
Super User

The currentRecord is set on the previous screen and it is used to return every single data point on this screen, all of which are working correctly except the toggle.  The toggle is also returning the correct value but the switch is not rendering.

 

tonykiefer_0-1636472608503.png

 

tonykiefer
Super User
Super User

Even if I change the value in the data base...the toggle returns the currentRecord, the currentRecord returns the correct value, the toggle displays the correct value...but the toggle switch is not rendering.

tonykiefer_0-1636473606381.png

 

This suggests to me that something is wrong with the toggle control.

@tonykiefer ,

 

By your first screenshot, I see that you ProdDevComplete = "Yes" and for the toggle's default property you are using "If ProdDevComplete = 'Y'" Can this be the issue?

tonykiefer
Super User
Super User

The values in the db are stored as "Y" or "N".  I set the default property as such...If((currentRecord.ProdDevComplete) = "Y",true,false)...since the control works with true or false this is making the substitution.  Several articles use the same method.  Also, before setting the value...at the point of inserting the control on the data card...the switch doesn't render.  

 

The switch should render whether it is set or not.  Just to reiterate...The switch didn't render before setting the default property either.

 

I could totally be doing something wrong and that's why I included all settings as screen shots and performed my db test to make sure the correct values are coming back...which they are.

tonykiefer
Super User
Super User

@PTBBSolutions 

 

I figured it out.  The display field for the data card was set to "View".  When I changed it to "Edit" the toggle switch rendered.

 

Thank you for helping me troubleshoot!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,441)